Forum Discussion

mTobis's avatar
mTobis
Copper Contributor
Apr 09, 2021

Fehler bei CustomDocumentProperties-Datum-Definition und Anzeige der DocumentProperty

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?

No RepliesBe the first to reply

Resources