Word VBA refernces to .tlb

S

slaprade

I have a vs2007 project using created extensibility add-in for Word 2007. As
such I must load my dotm file, switch to developer/visual basic (ALT F11),
selected references, locate the .tlb file and add it. This all works fine as
does the .net code

The problem occurs (occasionally) as I make changes to the .net code.
Sometimes when I initiate the Word process, I will get a dialog box "could
not open macro storage".

When I start Word, load the .dotm file, ALT F11 to open VBA and check
references, I notice the .net project I am using is listed as missing. It
still has a check beside it. I uncheck to project, close references, open
references again, locate the project name (it is still in the available
refernces - just un checked), recheck the project, save and close the .dotm,
I am once again able to use word as expected with the addin functioning
correctly

This does not happen every time I change the project code. I often transfer
the solution and develop on other computers then transfer to solution back to
the original development computer. This effort always requires the dropping
of the project and then locate anc check it in VBA.

I expect this project to be in use for at least 5 years with many changes to
the code. I have worked out a deployment scheme that will auto deploy and
install the project as users login. The requirment to reload the reference in
VBA will be a problem.

Is there a registry change that I can record and push back during deployment?

Where is the information aboout loaded refences in VBA for Word maintained?

How can I inform Word (in an automated way) that the refernce to the .tlb
file is valid?
 
C

Chip Orange

I have the same issue with Word .dot add-in for projects. I place them in
the directory for global add-ins in the <user profile area>\application
data\microsoft\word\startup and Word always finds them, even if the project
references say they aren't correct. This allows me to run the project
reliably, just not makes changes to it, without going through the steps you
outlined.

hth,

Chip
 
S

slaprade

can the deployment wizard of VS2005 be told to install the tlb in different
directories during the install?

My plan (at the moment) ivolves having a file with a particular name (that
is incremented for each version) that the login script of the AD looks for in
a particular directory on the attached computer. If the new filename doesnot
exist then the login script runs the installer. The installer can be set to
(thoufgght I haven't tried this part) run silently
The deployment wizard allows the change to the version# and product code of
the deployment to automatically uninstall the oldversion and reinstall the
new (this I have tested)
 

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