P
Philip
I have a .NET addin that was written on a machine that has Office XP 2003 installed on it which uses the Microsoft Word 11.0 Object library to open Word and add some custom attributes to an existing Word file. I am now trying to run that application on a machine that has Office 2002 installed on it. Should this work? My application seems to fail when trying to use a reference to the Word Object. This works fine with Office 2003, but not in Office 2002. Here is my cod
Dim oWord As New Word.Applicatio
'open the fil
oWord.Documents.Open(fileName, False, False) 'OBJECT REFERENCE ERROR OCCURS HER
'add the custom propert
oWord.ActiveDocument.CustomDocumentProperties.Add(Name:="ProfileID", LinkToContent:=False, Type:=1, Value:=myID
'save the documen
oWord.ActiveDocument.Save(
'close the documen
CType(oWord.ActiveDocument, Word._Document).Close(
'close Wor
CType(oWord, Word._Application).Quit(
'clean u
oWord = Nothin
If the answer is to reference the 10.0 library, how can I do this? I only have the 11.0 libraries available in my reference list
ANY help is greatly appreciated
Thanks.
Dim oWord As New Word.Applicatio
'open the fil
oWord.Documents.Open(fileName, False, False) 'OBJECT REFERENCE ERROR OCCURS HER
'add the custom propert
oWord.ActiveDocument.CustomDocumentProperties.Add(Name:="ProfileID", LinkToContent:=False, Type:=1, Value:=myID
'save the documen
oWord.ActiveDocument.Save(
'close the documen
CType(oWord.ActiveDocument, Word._Document).Close(
'close Wor
CType(oWord, Word._Application).Quit(
'clean u
oWord = Nothin
If the answer is to reference the 10.0 library, how can I do this? I only have the 11.0 libraries available in my reference list
ANY help is greatly appreciated
Thanks.