Disabling a Word COMAddin in Access VBA

R

Rosemary

I have a database that generates Word documents and have never had a issue
until we went to Vista. In Word, there is an Addin for ApproveIt that if it
is active when running the Access program, Word cannot open and tries to
recover. If I disable the COM Add-in for ApproveIt in Word, then run the
application, it generates the document just fine. I want to programmatically
disable and enable the ADTAPILib.ApproveItAddin. It is listed in Word as
type COM Add-in. I've set a reference to the Silanis ApproveIt Desktop API
1.0 Type Library, hoping that would help, but it didn't. In the object
browser, I can see the ADTAPILib library, but can't seem to find a way to
disable the add-in.

Any help is appreciated.
 
R

Rosemary

Rosemary said:
I have a database that generates Word documents and have never had a issue
until we went to Vista. In Word, there is an Addin for ApproveIt that if it
is active when running the Access program, Word cannot open and tries to
recover. If I disable the COM Add-in for ApproveIt in Word, then run the
application, it generates the document just fine. I want to programmatically
disable and enable the ADTAPILib.ApproveItAddin. It is listed in Word as
type COM Add-in. I've set a reference to the Silanis ApproveIt Desktop API
1.0 Type Library, hoping that would help, but it didn't. In the object
browser, I can see the ADTAPILib library, but can't seem to find a way to
disable the add-in.

Any help is appreciated.
I've gotten a little further - I can test to see if it's connected or not,
but can't seem to figure out how to actually disable it. Code is as follows:

Set Doc = CreateObject("Word.Application")
If Doc.COMAddIns.Item("ADTAPILib.ApproveItAddin").Connect Then
MsgBox "The add-in is connected."
' Doc.COMAddIns.Item("ADTAPILib.ApproveItAddin").Unload (This is wrong)
Else
MsgBox "The add-in is not connected."
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top