How to reference custom XML in word?

E

elixirmike

Here's the scenario I'm attempting to solve. I would like to create a word
document that I mark up using my custom XSD. I then am creating a smart
document solution in VSTO 2005 with this document, in which I want to add a
button which will programmatically capture the custom XML data in the
document and pass it to a web-service.

I have the marked up word 2003 with XML, and I can bring that into a smart
document solution...but it's not obvious or clear how I can reference those
custom XML elements??

Is their an object that will allow me to retrieve these elements?
thanks
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?ZWxpeGlybWlrZQ==?=,
Here's the scenario I'm attempting to solve. I would like to create a word
document that I mark up using my custom XSD. I then am creating a smart
document solution in VSTO 2005 with this document, in which I want to add a
button which will programmatically capture the custom XML data in the
document and pass it to a web-service.

I have the marked up word 2003 with XML, and I can bring that into a smart
document solution...but it's not obvious or clear how I can reference those
custom XML elements??
Under "Smart document" I understand something that implements the
ISmartDocument interface. Are you using that, or did you just like the term
and use it to describe what you're doing with VSTO?

In what way do you want to "reference those custom XML elements"? Read/write
the content? Do something with the task pane? React when the user enters or
changes the information?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
E

elixirmike

Hi Cindy, thanks for the reply. with "smart document", I'm just referring to
the fact that I'm building a solution with VSTO 2005.

I actually figured out my problem and are able to reference the XMLNodes in
the WordDoc...very nice!

But I do have a separate, but related question. The solution I'm using will
have maybe 2 to 3 people who will have downloaded and run this smart
document. However, they will be sending around the doc to other users who
have word 2003, but will not have installed the addin, which is fine. They
can still edit,save and rerout the document back to the main people, who can
use the add-in for the final delivery of the data.

My question is, when a user who hasn't installed the add-in opens the
document, they get the warning message about this. They can click "ok" and
then edit, but is there a way to suppress the warning/error message so they
don't see that??

Thanks for your help!
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?ZWxpeGlybWlrZQ==?=,
My question is, when a user who hasn't installed the add-in opens the
document, they get the warning message about this. They can click "ok" and
then edit, but is there a way to suppress the warning/error message so they
don't see that??
For VSTO 2003 I could tell you for sure: it's controlled by two properties
(File/Properties/Custom) that inform the loader the document should be linked
to a VSTO solution DLL, and give the location of the DLL. Remove these
properties, and the document no longer "knows" it belongs to a VSTO project.

Unfortunately, I haven't had time to look at VSTO 2005 in-depth since it was
in early beta, some 18 months ago. I seem to recall that this is managed
differently in VSTO 2005, but I may be mistaken. (Getting re-acquainted is
very high on my to-do list!) In any case, if the document properties idea
isn't valid, try asking in the vsnet.vstools.office newsgroup. (Or give me a
couple of weeks to get up to speed <g>)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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