Hallo Zusammen,
hat jemand ein Tool um das Plotdatum auf die idw zu setzten.
Ich habe mich gerade durch das Archiv gewühlt und von Richard (riysche) das unten stehende Tool gefunden. Einziges Manko ist, dass das Datum nicht automatisch aktuallisiert wird.
Da ich von VBA keine Ahnung habe, habe ich die Frage ob jemand die passenden Zeilen liefern kann, wo dann das Datum beim Plotten aktuallisiert wird?
Danke im Voraus!
Thomas
Public Sub AddSysDateTime()
On Error Resume Next
'Check if the active document is a Drawing
If ThisApplication.ActiveDocumentType = kDrawingDocumentObject Then
'Add a custom property "SysDate" with system date
Set oPropSet = ThisApplication.ActiveDocument.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
'As a workaround the property must be delete because it can not be changed
oPropSet.Item("SysDate").Delete
Call oPropSet.Add(Date, "SysDate")
'Add a custom property "SysTime" with system time
Set oPropSet = ThisApplication.ActiveDocument.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
'As a workaround the property must be delete because it can not be changed
oPropSet.Item("SysTime").Delete
Call oPropSet.Add(Format(Time, "hh:mm"), "SysTime")
End If
End Sub
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP