VSTO specific code

Add-in Express™ Support Service
That's what is more important than anything else

VSTO specific code
 
T Rolle




Posts: 32
Joined: 2006-07-23
Hi,

I'm transferring some methods from a VSTO project to ADX and I can't figure out how to convert this line of code:

1. Globals.ThisDocument...

thanks.
Posted 29 Oct, 2008 23:08:34 Top
Eugene Astafiev


Guest


Hi Tonio,

You can use the following: WordApp.ActiveDocument.
Posted 30 Oct, 2008 04:03:59 Top
T Rolle




Posts: 32
Joined: 2006-07-23
Hi,

thanks. the biggest problem I have converting my VSTO Word app to ADX is the references to microsoft.office.interop.word. Could you please tell me ADX the equivalents of the following:

In separate .cs files, I have "using Word = Microsoft.office.interop.word". What is the correct adx using statement I should have there.

similarly, I use statements such as:
Globals.ThisDocument.StoryRanges[Microsoft.Office.Interop.Word.WdStoryType.wdFootnotesStory].Fields;

I tried using wordapp in a .cs file (other than addin module) and it's not available. I know wordapp is defined and available in the main add-in module, but how do I access it from other files?

In a previous VSTO app I worked on which used elements of ADX, I used "(this.ThisApplication as ThisDocument)... What's the equivalent of that statement that I can use in a Word add-in? Thanks.
Posted 30 Oct, 2008 16:04:27 Top
Eugene Astafiev


Guest


Hi Tonio,

Have you read the documentation? I'd suggest you reading the documentation first.

In separate .cs files, I have "using Word = Microsoft.office.interop.word". What is the correct adx using statement I should have there.


Please read the "Add-in Express Tips and Notes" section in the documentation.
Posted 30 Oct, 2008 16:16:12 Top