Should this be an addin?

K

Keith Giddings

I want to write some code that will allow me to add some information to a
word document or an excel spreadsheet. In order to input the information I
need to execute an activex that I have written. However I want to be able
to click a button in Word or Excel (2000,XP & 2003), bring up a dialog that
contains the activex, grab the information and then store it in the
document. One issue is that I do not want to have to distribute my addin
with the document, I would simply like a pictorial representation to appear
at the current position for users that don't have my addin.

So, to the question. Is what I need to write an addin or should it be some
other entity?

Regards
Keith.
 
M

Michael Böhnisch

I don't know much about VBA, so I'd go for an add-in. The Visual Studio .NET 2003 office add-in wizard sets up everything read to go, it even creates an installer package automagically for the deployment

Debugging is nice, too, you can trace your add-in while it's running in an Office application

Documentation on Office programming in VC++ is hard to find, nearly all examples I encountered are for Visual Basic, so you may want to stick to that language

Your mileage may vary.
 
K

Keith Giddings

Michael Böhnisch said:
I don't know much about VBA, so I'd go for an add-in. The Visual
Studio .NET 2003 office add-in wizard sets up everything read to go,
it even creates an installer package automagically for the
deployment.

Thanks Michael - very useful.

Regards
Keith.
 
M

Matrim Cauthon

*snip*
Debugging is nice, too, you can trace your add-in while it's running in an Office application.

How can you obtain such an easily debugging your addin in VS .NET while running?

Thanks,

Mat.
 
M

Michael Böhnisch

My language version is not english, so I have to guess on the english menu names

In the project settings, go to "Debug". Under "Command" enter the full path of the Office application executable you designed your add-in for. For Outlook 2003 this might be something like
C:\Programs\Microsoft Office\OFFICE11\OUTLOOK.EX

Set breakpoints to the code lines you want to inspect and press F5. The office application will get started and it loads your add-in, As soon as one of the breakpoints is hit Visual Studio pops to the front and you can operate just like with any other code under debugger control

Kind regards

Michael
 

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