This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to modify Word document from M-Files Server VBScript?

Former Member
Former Member
I want to create a script on M-Files server that sets "Track Changes" when a Word document enters a certain state and "Accept All Changes and Stop Tracking" when the document enters a later state.

State Draft: "Track Changes"
State Submitted: -
State Reviewed: -
State Accepted: "Accept All Changes and Stop Tracking"
State Issued: - (next state is Draft for next major version of document)

I found the place in M-files Server Administrator to create the VB Script: Vault/Workflows/Properties/State/Edit/Actions/Run Script

According to the documentation the following variables can be used in the script: VaultSharedVariables, MFScriptCancel, CurrentUserID, Vault, DisplayID, ObjVer, PropertyValues, and StateID.

In Word VBScript I can set this propertiy by with:

ActiveDocument.TrackRevisions = True

How to do the same from M-Files server script?

Best regards

Erik