Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

WordFile.SetXML

Sets the xml for this word file.

Component Version macOS Windows Linux Server iOS SDK
WordFile 6.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "WordFile.SetXML"; WordFile; XML { ; Part } )   More

Parameters

Parameter Description Example Flags
WordFile The reference number of the open word file. $wordFile
XML The XML content for the word file.
Part The name of the part to query.
See WordFile.Parts for a list of parts.
if no part is given, we use the document.
"document" Optional

Result

Returns OK or error.

Description

Sets the xml for this word file.

Examples

Change XML directly:

# get xml
Set Variable [ $xml ; Value: MBS( "WordFile.GetXML"; $wordfile) ]
# Change something
Set Variable [ $xml ; Value: Substitute($xml; "Times New Roman"; "Helvetica") ]
# put xml back
Set Variable [ $r ; Value: MBS( "WordFile.SetXML"; $wordfile; $xml) ]

See also

Blog Entries

This function checks for a license.

Created 15th March 2016, last changed 29th December 2021


WordFile.SetMediaFile - WordFile.Substitute