02-13-2012, 10:45 PM
I am trying to get a startup file for MS Word (Addin Custom.dotm) be run thru below script. The script is working, but I didn't get the add-in (extra menus) to show in MS Word. Could you tell me if the below script would actually run the extra file?
There was no error when running above script, and MS Word opened. But i didn't see the extra menus that should show with the Add-ins. Any help to make this work would be appreciated.
I am using Qtp 10, and MS Word 2007.
Code:
Call MacrosVBALoad()
Sub MacrosVBALoad()
Dim ExtraPath
Set obj_Word = CreateObject("Word.Application")
'Load New Macros Program'
On Error Resume Next
ExtraPath= obj_Word.Options.DefaultFilePath(wdStartupPath)
obj_Word.AddIns.Add ExtraPath+"Addin Custom.dotm", True
obj_Word.visible = True
obj_Word.Documents.Add()
End Sub
There was no error when running above script, and MS Word opened. But i didn't see the extra menus that should show with the Add-ins. Any help to make this work would be appreciated.
I am using Qtp 10, and MS Word 2007.