WordML - Modified Tags - Save Document

gduron

Board Regular
Joined
Mar 27, 2006
Messages
94
Hello,

I have a Microsoft word document that was originally created as a docx file. Subsequently I saved the file as an xml document and then edited some of the tags.

Original WordML Formatting:
Code:
<w:t>Company ABC</w:t>

Word Formatting after my changes:
Code:
<w:t name="COMPANYNAME_KEY">Company ABC</w:t>

I created a macro that takes information from Microsoft Excel and updates the wordml document by searching for the attributes that I created like "COMPANYNAME_KEY".

Everything works great, except on occasional I'd like to open the XML document in word and add a brand new paragraph. When I do this and I click "Save" all of the custom attributes I added to other areas of the documents disappear and revert back to the normal wordml formatting.

How do I preserve the attributes that I created when you click save in Microsoft Word?

Thanks in advance.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,225,551
Messages
6,185,600
Members
453,307
Latest member
addydata

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top