Heelo,
I have been trying to extract requirements form a word document and pull them into Excel for traceability.
The information on VBA and MS applications seems *very* slim, so please be gentle![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
All items are denoted by the Text Shall([section#]) in the Word doc, when I toggle field codes they in the form of "shall ({ REF _Ref2445166 \r \h}b)". I need to recursively iterate through the document pulling out the sentences that contain these requirements and putting them into an excel worksheet.
I am to the point where I can open the document and find the "shall" text, but when I try to use
" myWord.Selection.MoveRight Unit:=wdCharacter, Count:=1"
I get:
"Run-time error '4120', Application-defined or object-defined error"
It is my understanding that this should select the rest of the sentence text.
How do I do this? If possible please post code as well as descriptions.
Thanks
-Jonathan
I have been trying to extract requirements form a word document and pull them into Excel for traceability.
The information on VBA and MS applications seems *very* slim, so please be gentle
All items are denoted by the Text Shall([section#]) in the Word doc, when I toggle field codes they in the form of "shall ({ REF _Ref2445166 \r \h}b)". I need to recursively iterate through the document pulling out the sentences that contain these requirements and putting them into an excel worksheet.
I am to the point where I can open the document and find the "shall" text, but when I try to use
" myWord.Selection.MoveRight Unit:=wdCharacter, Count:=1"
I get:
"Run-time error '4120', Application-defined or object-defined error"
It is my understanding that this should select the rest of the sentence text.
How do I do this? If possible please post code as well as descriptions.
Thanks
-Jonathan