Word XML documents - not straight forward raw editing??

I wanted to use Word XML documents to create templates that I could then use as templates.

I thought because it's XML, things would be straight forward.

I've created an XML document and have tried editing and adjusting using Notepad. It broke very very easily.

The file itself seems a big unorganised mess - unlike a nicely formatted XML document that can be human read.

Am I missing something?

Can I make the XML file readable by adding enough white space around tags?

Otherwise, what's the point of having the XML format!!?

I'm now thinking to avoid XML and use HTML format - I don't really want to... but I think I'll save a lot of grief

(I started off thinking PDF format was my answer for using as a template... but don't think so... that also has many downsides)

Would love to hear what others say - have I got it wrong?

Thanks

Omar

Why create a file in word and then use notepad to edit, defeats the purpose of using word in the first instance.

Provide more details regarding what exactly you are trying to do, and may be someone would be able to offer suggestions.

Trying to be helpful.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

@Elemantal, thanks for the reply

The plan was to create a Word XML document to make a template invoice designed and laid out exactly how I wanted.

Then use a coding language like Python to input a CSV file of records and then create many copies of the template (in one document) by inputting into place holders in the template with the values from each record from the CSV

Hence, why I tried to edit using notepad - since this is what would be required in effect using a coding language

At first, I thought a PDF would be the way. Too many pitfalls there and the best solutions where to create the PDF on the fly (not enough options to use a template).

Then I realised that Word docs can be saved in XML format... but not the XML format I understand (data that is well organised and delimited by white spaces that can be human read!)

I'm really stuck trying to find the best solution

The only alternative I can think of is to use HTML. But then from what I understand, printing in HTML is hit and miss. The invoices final output is in printed format

Thanks in advance

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

still stuck with this one...

but... i loaded the document into firefox

yipee!!

a super nicely structured document that is human readable!!!!!!!

yes!!!

except... no :(

i simply tried copying and pasting the information from firefox and saving as a new files and then trying to load into word - it doesn't like it and says its broken or something to that effect

the document as given by firefox seems to be missing some of the data

oh well   :(

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hello Omer,

 

Since you are trying use a coding language to input a CSV file of records and then create many copies of the template, your query would be better addressed in the Word IT Pro Forum.

http://social.technet.microsoft.com/Forums/office/en-US/home?forum=word

If you have any other questions related to Office products, you can always reply and I’ll be happy to assist you.

 

Thank you.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

The proper tool within Word (or Excel or Access) for making many copies of the same document with variable data is mail merge. The only reason I can think of to bring in custom-written XML and Python is to see how hard it can be to reinvent the wheel.
_____________________________
https://jay-freedman.info

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

@girish thanks for the pointer. i'll use that in future for such questions

@jay freedman: i hear what u say

maybe its me who is misunderstanding. by understanding and belief of xml structure was the it allowed to be human readable - everything was encapsulated within tags - and that it was a world away from unorganised and unreadable machine code

when i saw save as xml as an option, this is what i thought

i didnt necessarily expect it to be readable... but i did expect to be able to look at sub sections and duplicate and replace without disturbing the balance of the file - this is not true

from my very little experience of mail merge, i know it's clunky and slow if trying to join several hundreds of records - let along 1000's

let me know if i'm missing something. i'm happy to be corrected by a pro like you guys

thanks in advance

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated September 30, 2021 Views 690 Applies to: