View Single Post
 
Old 06-09-2015, 12:03 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,343
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That is rather different from simply adding them to the document's properties, though having done so you will find the corresponding xml code inside the docx file. As I said in your other thread ():
Quote:
saving the data from a userform in an xml format requires you to supply all the relevant xml tags - whose attributes depend on what you're trying to do with the xml
How you would go about that depends on whether you already have some boilerplate xml code like:

<metadata>
<SystemInfo>Customer Info</SystemInfo>
<NumberOfRecords>2</NumberOfRecords>
<FileTransferHeader>
<ProcessingDate>20150531</ProcessingDate>
<ProcessingTime>205036</ProcessingTime>
<FileName>sample.docx</FileName>
</FileTransferHeader>
</metadata>

or:

<metadata>
<SystemInfo>Customer Info</SystemInfo>
<NumberOfRecords>2</NumberOfRecords>
<FileTransferHeader>
<ProcessingDate>20150531</ProcessingDate>
<ProcessingTime>205036</ProcessingTime>
<FileName>sample.docx</FileName>
</FileTransferHeader>
<RecordsInfo>
<Name></Name>
<Address></Address>
<Author></Author>
</RecordsInfo>
</metadata>

In the first example, you'd need to add all of:

<RecordsInfo>
<Name>Rose</Name>
<Address>20150531</Address>
<Author>Admin</Author>
</RecordsInfo>

to the file, perhaps replacing </metadata> as well. In the second example, you might just want to insert:
Rose
into:
<Name></Name>
and so on - or you might want to replace the entire:

<RecordsInfo>
<Name></Name>
<Address></Address>
<Author></Author>
</RecordsInfo>
</metadata>

block with:

<Name>Rose</Name>
<Address>20150531</Address>
<Author>Admin</Author>
</RecordsInfo>
</metadata>

So, you see, it's all a matter of deciding which approach works best for you. There are no hard & fast rules about this.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote