Fehler bei CustomDocumentProperties-Datum-Definition und Anzeige der DocumentProperty

Occasional Visitor

Option Explicit

 

Public Sub Test()

    Dim k As String, d As Date

    k = "06.02.2021"

    d = DateValue(k)

    ActiveDocument.CustomDocumentProperties("Testdatum").Value = d

    ActiveDocument.PrintPreview

    MsgBox k & vbCrLf & CStr(d) & vbCrLf & CStr(ActiveDocument.CustomDocumentProperties("Testdatum").Value)

End Sub

 

{ DOCPROPERTY  Testdatum \@ "dd.MM.yyyy" \* MERGEFORMAT } = 05.02.2021

 

also 1 Tag weniger...

 

Programmierfehler in Word?

0 Replies