Wat doe ik verkeerd?
ik wil graag de eigenschappen van een document kunnen bekijken.
ik wil graag de eigenschappen van een document kunnen bekijken.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| Private Sub Form_Load()
Dim wd As Word.Application
Dim Doc As Word.Document
Set wd = New Word.Application
Set Doc = wd.Documents.Open("C:\test.doc")
MsgBox Doc.BuiltInDocumentProperties(wdPropertyTitle)
MsgBox Doc.BuiltInDocumentProperties(wdPropertyAuthor)
MsgBox Doc.BuiltInDocumentProperties(wdPropertyKeywords)
MsgBox Doc.BuiltInDocumentProperties(wdPropertyCompany)
MsgBox Doc.BuiltInDocumentProperties(wdPropertyPages)
Doc.Close wdSaveChanges
wd.Quit
Set Doc = Nothing
Set wd = Nothing
End Sub |