Solved

Enable a Custom MS Word Com Addin when .xa file extension is opened

Posted on 2014-01-07
4
21 Views
Last Modified: 2016-04-29
Hey All,

I have a little problem. We have a  custom Com Add in that must be loaded in MS Word so as it is able to launch .xa files from another application for editing.
The problem is that this add in is now causing problems when another application launches certain types of word documents.

What im wondering is, is there a way for me to set that this .xa com add in is only loaded when the .xa file is launched???
0
Comment
Question by:AGOIT
4 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 39762526
There are some VBA methods that will add or remove an add-in with respect to the known  add-ins collections and set its installed status:
   
     AddIns( "C:\Templates\MyTemplate.dot" ).Installed = True
 
    AddIns( "C:\Templates\MyTemplate.dot" ).Installed = False

    AddIns( "C:\Templates\MyTemplate.dot" ).Delete

Open in new window


If you create a new Document from your .xa template file, you could set the installed status to True in the Document_New event of the ThisDocument module. There isn't a corresponding Document_Close event, but you could use an AutoClose macro in the template to set the property to False.
0
 
LVL 14

Expert Comment

by:DrTribos
ID: 39763634
The OP mentions "another application" - it is not clear how many other applications are being used but I suspect it is only 1 other application?  Is that correct?

Is this other application always launching the files into word or can it be used to view the word documents - e.g. something like open office?
0
 
LVL 13

Expert Comment

by:frankhelk
ID: 41570971
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now