Word.Application Object
Hello,
I'm new to this forum, and this isnt strictly a VBA question more a VBS one but it is relevant so please hear me out.
Im trying to run this piece of code..
Set oWord = CreateObject("Word.Application")
oWord.AddIns.Add FileName:="C:\Program Files (x86)\Labelling Tool v.2.0\LabelingData\Labeling.dotm", Install=True
oWord.AddIns ("Labeling.dotm").Installed = True
oWord.Quit
Set oWord = Nothing
However it stop at this line..
oWord.AddIns.Add FileName:="C:\Program Files (x86)\Labelling Tool v.2.0\LabelingData\Labeling.dotm", Install=True
With this error..
Microsoft VBScript compilation error: Expected statement
The file does exist in this location.
If I comment this line out, (the addon is already installed), I get an error on the next line...
'The requested member of the collection does not exist'
Its referring to 'Labeling.dotm'
I have followed the API info for these methods and properties, and yet they just dont work?
Can anyone help please?
Thanks, brynrogers
|