Skip to content

Instantly share code, notes, and snippets.

@EmmaB
Created March 19, 2015 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EmmaB/de50c644f31396cdab47 to your computer and use it in GitHub Desktop.
Save EmmaB/de50c644f31396cdab47 to your computer and use it in GitHub Desktop.
ONIX to Word macro data
Dim strXPath1 As String 
strXPath1 = "/ONIXMessage/Product/ProductIdentifier[ProductIDType='03']/IDValue" 
ActiveDocument.ContentControls(1).XMLMapping.SetMapping strXPath1 
Dim strXPath2 As String 
strXPath2 = "/ONIXMessage/Product/BICMainSubject" 
ActiveDocument.ContentControls(2).XMLMapping.SetMapping strXPath2
 Dim strXPath3 As String
 strXPath3 = “/ONIXMessage/Product/Title[TitleType='01']/TitleText"
ActiveDocument.ContentControls(3).XMLMapping.SetMapping strXPath3 
Dim strXPath4 As String 
strXPath4 = "/ONIXMessage/Product/OtherText[TextTypeCode='01']/Text" 
ActiveDocument.ContentControls(4).XMLMapping.SetMapping strXPath4 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment