Using #import with Office

A

AlanC

I'm developing an add-in for Word using C++ (VC 6.0). I've read up on the
subject a bit, both on MSDN and elsewhere, and I'm not sure what to do. I
read that one shouldn't use #import with Office because of some bugs
(reference counting, I believe). I've also found tutorials for making COM
add-ins for Office using #import. Is it a bad idea to use #import with
Office?
 
B

Birgit

Hi Alan,
I read the same articles recently and decided to do it without the import.
If you know VBA you may find it quite easy with the 2 following links and
some experimenting:

http://support.microsoft.com/kb/q238393/

http://www.a-m-i.de/tips/office/officeautomation.php#cppexample_word

The last link is in german, but you may still be able to make something of
the code. It's using ATL and it got me started. Combining the information in
the 2 you will probably be able to figure out the principle by way of the
second and use the first way (which has a possiblity of adding extra
values - as needed for docProps.)

See my question below if you have already figured out something about Word
Add-ins (word add-in c++ toolbar invisible at 2nd start of word).

HTH,
Birgit
 

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