Event in VBA for after fill a XML TAG in word

kool_zero

New Member
i have a word document with xml tags in it. These tags are filled by an application witch opens the document fill them and converts the document to pdf and send it to file share application.My problem is that the document have tables and text which tags will be empty. I want to check these tags after the "filling" event and hide the paragraph containing it, but i don't have the event to do that.I have the code below to check the tags value so i can see if they are empty, but i don't know in wich event i can put it. Until now the only one i discovered tha executes the code is the open document like i show in the code below. The others are not triggered.\[code\] Private Sub Document_Open() ValidateTags End Sub Sub ValidateTags() Dim r As XMLNodes Dim i As Integer Set r = ActiveDocument.XMLNodes i = 0 Do While i < 10 i = i + 1 If i = 10 Then Exit Do MsgBox (r(i).BaseName & " # " & r(i).NodeType _ & " # " & r(i).NodeValue & " # " & r(i).Text) Loop End Sub\[/code\]The open event occurs before they are filled. I need one after that, preferably without human interaction, since i intend this process to be automatic.I need VBA solution for a macro in the document in wich i have the tags.Can you help me?Thanks
 
Back
Top