G
Guest
I have code that looks like this:
Set AppName = CreateObject("Word.Application")
AppName.Visible = True
AppName.ChangeFileOpenDirectory "C:\New Folder\"
AppName.Documents.Open filename:=strTitle, _
ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto
MsgBox (AppName.Documents.Item(strTitle).Name)
MsgBox (AppName.Documents.Item
_(strTitle).BuitInDocumentProperties(wdPropertyWords))
The first message box correctly returns the name of the document opened
remotely.
The second MsgBox fails with a message that says the object does not support
this property.
I'm trying to read in the document properties of a large selection of files
so that I can sort them by author and date etc.
It seems to me that this should work, any ideas what the problem is?
Set AppName = CreateObject("Word.Application")
AppName.Visible = True
AppName.ChangeFileOpenDirectory "C:\New Folder\"
AppName.Documents.Open filename:=strTitle, _
ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto
MsgBox (AppName.Documents.Item(strTitle).Name)
MsgBox (AppName.Documents.Item
_(strTitle).BuitInDocumentProperties(wdPropertyWords))
The first message box correctly returns the name of the document opened
remotely.
The second MsgBox fails with a message that says the object does not support
this property.
I'm trying to read in the document properties of a large selection of files
so that I can sort them by author and date etc.
It seems to me that this should work, any ideas what the problem is?