Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2007
    Location
    Massachusetts, USA
    Posts
    272
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Macro needed to find styles and apply XML elements to each style

    Hello,

    I am using MS Word 2010 and not sure if anyone has tried this yet or not, but I would
    like to have a macro that will:
    1. Point to a folder full of documents on my "C" drive (e.g. C:\Test)
    2. Loop through each document and find the styles used in the document. (Not all the styles, but just the ones used in the document)
    3. Replace or amend each style to apply an XML element where it sees the style.
    In the past, I was able to attach an XSD (via the Developer pane) to a MS Word document, which then gave me a drop down menu (through right click I think and also showed the attributes and elements available in two windows on the right, but I can't see that in MS Word 2010 for some reason). In any case I would like to apply or set it up so each section (style) in a document gets an XML tag applied to it.

    Any thoughts or suggestions on this are very much appreciated.

    Regards,

    Jim

  2. #2
    3 Star Lounger
    Join Date
    Jan 2007
    Location
    Massachusetts, USA
    Posts
    272
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Mapping Style Names to Element Names in MS Word 2010

    http://windowssecrets.com/forums/sho...Word-2003-SP2)

    http://www.devx.com/dotnet/Article/17358/1954?pf=true



    I
    just found I had posted a macro request for this way back when I was using MS Word 2003, but I never got a working macro. And, now I have come back to the point where I need a macro that will simply map the style name with an (XML) element name.

    Again, I appreciate any thoughts or suggestions on how to create this macro.

    Regards,

    -J

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •