Solved

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

Posted on 2014-01-07
4
29 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 15

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 14

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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

696 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