Using VB to add GUID to Word style

J

Jason

Hi,

I'm working on a project involving the parsing of Word 2007 XML
documents. While Word 2007 includes revision IDs within new or revised
snippets of text, it doesn't by default assign a unique ID to each
paragraph. I'm thinking about doing this automatically from within
Word by attaching a bit of VBScript to a style. This way, when the
document author marks up a bit of text as a paragraph, the GUID would
automatically be generated and included as an attribute when the
document is saved as XML.

Anybody have any input regarding how I might go about doing this? If
you're familiar with Word 2007's XML output capabilities, I'm trying
to achieve something like this:

<w:r w:rsidRPr="00A66914" w:guid="99FCE03C-C2EC-11DC-
A535-1E8D56D89593"><w:rPr><w:rStyle w:val="keywordChar"/></
w:rPr><w:t>Apache</w:t></w:r>

Any ideas?

Thank you!
Jason
 
T

Tony Jollans

I suspect it may not be possible but I don't know enough about this to
answer definitively - the revision IDs are, I think, unique per edit session
(per document) - but what are you trying to achieve? How will assigning a
GUID to a paragraph help you? Where else are you going to use the GUID?
 

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