VSTO application level add-in for Word

D

DougB

Hi,

I have what I thought was a very simple question but I'm stumped.

I have a very simple VBA macro for MS Word 2007 that I want to distribute
with a toolbar button to execute it.

It needs to have access to the current "activedocument" and cannot be
distributed in a document.

The code references things like the 'activedocument.selection.text' and the
'activedocument.content.find.hithilite'

My co-worker has previously developed add-ins that only referenced code in a
template. We are both stumped as to how to allow interaction with all
documents the application might load.

A number of websites seem to indicate that VSTO version 3 allows this (and
suggest it may have been taboo when VSTO first shipped) and/or there may be
hybrid solutions where install a trusted module of regular VBA Word code and
interact with it from our VSTO add-in but I don't see examples of either of
these.

Please help!

Thank you in advance.

--Doug B
 
D

DougB

Would the "EnableVbaCaller" functionality help here? If anybody can point me
in the right direction I'm willing to do the work. I'm under a tight
deadline and am really surprised that it is so difficult to distribute my
simple vba macro outside of a template.

Thanks!

--doug
 
M

Manvir Singh

D

DougB

Those articles seem to show these capabilities for "document level add-ins"
but this is an "application level add-in"

Can I really not do something as simple as write text to a Word document
from an application level add-in?

Please help, thanks!
 

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