Paul E.
Guest
|
This is more of a general question I'm hoping the COM add-in experts can answer here -- In Word 2003, I have the Microsoft Reader COM add-in -- it converts Word .docs to the MS Reader .lit format. I'm trying to automate the process of converting 200 documents, but when I try to create a macro including pushing the MSReader toolbar button, the toolbar button push and COM dialog steps do not get included in the macro.
Any help appreciated - microsoft.com and google and newsgroup searches yield almost zero info on COM add-ins...
Thanks!
|
|
Sven Heitmann
Posts: 193
Joined: 2004-08-23
|
I used a callback to call methods from my COM-AddIn.
However the method you want to call have to be public...
I use the callback to support shortcuts because you can't link a shortcut to a COM-AddIn Method directly :(
This is my Code:
Dim oManagedObject As Object
Public Sub RegisterCallback(oCallback As Object)
Set oManagedObject = oCallback
End Sub
Public Sub CallAdvancedPrint()
oManagedObject.CallAdvancedPrint
End Sub
Let us know if it helps you in some way =)
Best regards,
SvenBest regards,
Sven Heitmann |
|
Eugene Starostin
Guest
|
You can call a COM add-in if it publishes anything via its type library. Try to import its tlb. If there are some objects (interfaces) you win :-)
I used a callback to call methods from my COM-AddIn
You can create a new public method and then can call it via
WordApplication.COMAddins(ProgIDOfYourAddin).Object.YourNewMethod
Done?
|
|
Sven Heitmann
Posts: 193
Joined: 2004-08-23
|
You can create a new public method and then can call it via
WordApplication.COMAddins(ProgIDOfYourAddin).Object.YourNewMethod
That's working fine, reduces some code :)
Thanks Eugene for that hint :)Best regards,
Sven Heitmann |
|