Discussion:
Why my addin can't work correctly when started word programmatically?
(too old to reply)
Bill White
2004-11-04 02:12:16 UTC
Permalink
I built a word addin and placed it under directory *\office\startup. Every
time I start word, the addin is loaded and worked correctly.

But when I start word programmatically from a app, the addin isn't loaded
yet. and I found it is in word.addins collection, but not loaded. I tried to
delete it via "addin.delete" and then reloaded it by setting its property
"installed" true, but it was same as before.

Any one can help me to resolve it?

Thanks.


Bill white
Joost Verdaasdonk
2004-11-12 21:00:40 UTC
Permalink
Hi,

I presume you're AutoMacro's won't run?
If so this is (i think) a safety issue. (as always)

If you need to run you're main program on app launch then
you can use Application.Run (to the object)

Simple example: (I use from Excel)
Sub LaunchWord()
'Needs reference to Word library
Dim oWord As New Word.Application
With oWord
.Documents.Add
.Visible = True
.Run "Main" 'the procedure you'd like to run!
End With
End Sub

My main sub adds a custom menu and stuff...

Groetjes,
Joost Verdaasdonk

Loading...