Wie ermittelt man den aktuellen Dokumentpfad oder den Pfad der Vorlage.
Bei Verwenden einer Vorlage
ActiveDocument.AttachedTemplate.Path
|
Bei Verwenden eines Word Dokuments
ActiveDocument.AttachedTemplate.Path
|
Vba code-Beispiel
Public Sub fg_get_Document_Template_Path()
'---------------------< fg_get_Document_Template_Path() >---------------------
'< Document 1 >
Dim doc As Document
Set doc = ActiveDocument
'</ Document 1 >
'< get Template >
Dim tmp 'As wdAttachedTemplate
Set tmp = doc.AttachedTemplate
'</ get Template >
'< set Path >
°Path = tmp.Path
'</ set Path >
'---------------------< fg_get_Document_Template_Path() >---------------------
End Sub
|
Im Microsoft Word MS, vba
|