This project has moved and is read-only. For the latest updates, please go here.

Is it possible to use DocX methods on the current document?

Feb 1, 2011 at 12:20 PM

Hi Everyone,

I wonder whether it is possible to use DocX methods on the current document (Word.Application.ActiveDocument). In all examples I saw they use DocX.Load to load a document, but I'd like to work with the current selection.

Feb 1, 2011 at 3:21 PM
Hello A_K,

Word.Application.ActiveDocument is an object from a different API. You cannot use DocX methods on this object.
Why would you want to? Is DocX missing some functionality that this other API has?

You might be able to do some work with the Word.Application.ActiveDocument, save the document.
Then load it using DocX do the rest of your work and then save the document again.

Let me know what your trying to do and I will help you more.
Kind regards,
Feb 2, 2011 at 9:38 AM

Hello Cathal,

My intention is to create a button on a Word pane and use this button to save images to disk from the current document (save images you select in the document).

I found the following page and I think it contains the solution to my problem:

Thanks anyway!