l***@yahoo.com
2006-03-08 08:40:13 UTC
I want to run autoexec macro in addins, and call the Add method of the
AddIns collection. The addins are loaded, and the Installed property is
True. But the autoexec macro in the addins is not run.
Why? How to run autoexec macro in addins programmatically?
I write the code as follows:
Dim gwdApp As Word.Application
Dim strFileName As String
strFileName = Dir(gwdApp.Path & "\STARTUP\")
Do While strFileName <> ""
gwdApp.AddIns.Add gwdApp.Path & "\STARTUP\" & strFileName, True
strFileName = Dir
Loop
'User Profile Addins
strFileName = Dir(gwdApp.StartupPath & "")
Do While strFileName <> ""
gwdApp.AddIns.Add gwdApp.StartupPath & "\" & strFileName, True
strFileName = Dir
Loop
Liu Jianzhong
AddIns collection. The addins are loaded, and the Installed property is
True. But the autoexec macro in the addins is not run.
Why? How to run autoexec macro in addins programmatically?
I write the code as follows:
Dim gwdApp As Word.Application
Dim strFileName As String
strFileName = Dir(gwdApp.Path & "\STARTUP\")
Do While strFileName <> ""
gwdApp.AddIns.Add gwdApp.Path & "\STARTUP\" & strFileName, True
strFileName = Dir
Loop
'User Profile Addins
strFileName = Dir(gwdApp.StartupPath & "")
Do While strFileName <> ""
gwdApp.AddIns.Add gwdApp.StartupPath & "\" & strFileName, True
strFileName = Dir
Loop
Liu Jianzhong