Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Importing XML Data (XP 2003 Professional)

    I am attempting to import data from one Word Document to another via XML tags and a VBS Macro. Both documents use the same schema and I have correctly (I think) tagged the data in Doc B that I want to import into Doc A. As I understand I should be able to click on the appropriate tag in the the XML view window of Doc A and the tagged data of Doc B should come into it....but it's not working. Is there documentation on this for how to import data from one document into another using XML tags?

    Thanks for any help in directing me to a reference that would help with this.

    Regards,

    Jerry

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Importing XML Data (XP 2003 Professional)

    I don't know of any references to help you through this but may be able to figure out a solution if you can provide a clearer description of your problem.
    Do you want to run a script to import content or are you clicking on things to selectively import tagged information? Are you using VBS (without opening Word) or VBA (from within Word)? What code do you currently have?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    New Lounger
    Join Date
    Jan 2001
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing XML Data (XP 2003 Professional)

    Andrew,

    Thank you for your reply. I'm trying to selectively import tagged information from my Doc B into my Doc A. I'm using VBA within Word and the script I'm using is
    Private Sub Document_XMLAfterInsert(ByVal NewXMLNode As XMLNode, ByVal InUndoRedo As Boolean)
    If NewXMLNode Is Nothing Then
    'do nothing
    ElseIf NewXMLNode.BaseName = "KnowledgeBaseTopic" Then
    Dim theRange As Word.Range
    Set theRange = NewXMLNode.Range
    theRange.InsertFile "C:XMLTestecoaching.doc"
    End If
    End Sub

    I want to pull in tagged content from the ecoaching.doc file but it's not working.

    Thanks for any help or insight you can provide.

    Jerry Marino

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •