Word 2003 Add-in

M

Marco Moioli

Hi everybody:

I'm developing a Word 2003 Add-in button using C#
When I start Word, the button is load.
I write a document and I click the button to save the document and make
other operations.

I need to have an object representing the active document.
If I write
Microsoft.Office.Interop.Word doc = new Microsoft.Office.Interop.Word;

obviously I open a new document.

Instead, I need that "doc" is the active document in which I wrote.

Somebody can help me?

Thanks in advance,

Marco
 
S

S.Vidyaraman

Get the WordApplication Object and then get the Active Document. Something
like:
Microsoft.Office.Interop.Word doc = WordApp.ActiveDocument;

Hope this helps.

S.Vidyaraman
 

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