Word styles and XML tags

M

Michael

Hi,

Is it possible to have XML tags automatically applied to certain Word style.
For example, any text with "Heading 1" style will get the <title> tag
applied to it.

If this is not a built-in feature, maybe some simple coding can achieve what
I want? If so, can you please point me in the right direction; how to write
code to do that. Would that be a macro or something like that?

Thanks.
 
B

Bob Buckland ?:-\)

Hi Michael,

Word 2003 gained the ability to read/write XML documents.
For Word 2000 and 2002 it's sort of a 'canned' translator/
generator that's built in as to what it recognizes or
creates for Word Web documents.

For HTML if you use the built in Word Heading 1 style
the HTML file will show it as an <H1> tag, but if you
use the built in Title style, it only applies it as
a CSS style sheet (MSOTitle).

There are some 3rd party tools that let you go between
..DOC and .XML files for pre 2003 versions of Office.
This one has a free for personal use version.
http://infinity-loop.com


You may want to check with the folks in the Office XML
newsgroup for possible approaches that may work for you,
including the version of Word you're using and the
result you're trying to achieve.
news://msnews.microsoft.com/microsoft.public.office.xml


==========
Hi,

Is it possible to have XML tags automatically applied to certain Word style.
For example, any text with "Heading 1" style will get the <title> tag
applied to it.

If this is not a built-in feature, maybe some simple coding can achieve what
I want? If so, can you please point me in the right direction; how to write
code to do that. Would that be a macro or something like that?

Thanks. >>

--
I hope this helps you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

The Office 2003 System parts explained
http://microsoft.com/uk/office/preview/system.asp
 
M

Michael

Hi Bob,

Thanks for your posting.

I should have mentioned Word 2003. What I need to do is to save a Word 2003
document in XML DocBook format. I already have the DocBook schema attached;
so I could just apply the XML tags to the text in my Word document. That's a
very manual process. It would be good if Word 2003 had a built-in feature
that allows me to map Word style to XML tags. So for example, "Heading 1"
style text will get the DocBook <title> XML tag applied.
 
B

Bob Buckland ?:-\)

Hi Michael,

I see you posted in the Office XML newsgroup about
working with DocBooks :)

Brian, Chris, Mary and the other folks there would likely
be the ones that could help with setting that up.

I haven't checked to see if Chris has added new data
to his site http://officezealot.com yet since
http://officezealot.com/wiki/ow.asp?HowWordOpensAnXMLFile
( There's back to back developer conferences this month
in Anaheim, CA and Palm Springs, CA where some
of those folks are presenters so they may be a bit busy.)

You might also want to take a look at the information
Word/Office 2003 XML on http://msdn.microsoft.com/xml
and the Office 2003 page at
http://msdn.microsoft.com/library/en-us/dno2k3ta/html/ODC_Office2003Page.asp


==========
Hi Bob,

Thanks for your posting.

I should have mentioned Word 2003. What I need to do is to save a Word 2003
document in XML DocBook format. I already have the DocBook schema attached;
so I could just apply the XML tags to the text in my Word document. That's a
very manual process. It would be good if Word 2003 had a built-in feature
that allows me to map Word style to XML tags. So for example, "Heading 1"
style text will get the DocBook <title> XML tag applied. >>

--
I hope this helps you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

The Office 2003 System parts explained
http://microsoft.com/uk/office/preview/system.asp
 
M

Michael

Hi Bob,

Yes, I'm trying to look at different possible solutions. I'll check the
links in your message.

Thanks.
 

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