TripScott Posted April 7, 2009 Posted April 7, 2009 This seems like something that should be relatively easy, but I can't find any references to it anywhere. I am having AutoIt run a macro in Word 2003 (on XP). Word will do it's thing and store the data as a variable. How to I get that data into AutoIt? The Word script just has it read some text in the document and then store the value as valPartNum. I want that to to be stored in AutoIt's variable $sPartnumber. Any ideas CODE$oWordApp = ObjGet("", "Word.Application") $oWordDoc = ObjGet("", "Word.Application.Documents") _WordMacroRun($oWordApp, "GetPartNumber") $sPartnumber = $oWordDoc.script.variablename("valpartnum") Thanks for any help. Kristine
TripScott Posted April 7, 2009 Author Posted April 7, 2009 Because I don't know what I am doing. I am not sure how I would write it. oWordApp = ObjGet("", "Word.Application") $oWordDoc = ObjName("", "Word.Application.Documents") $line = FileReadLine($oWordDoc) _WordMacroRun($oWordApp, "GetPartNumber")
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now