ercicttech Posted Thursday at 12:48 AM Posted Thursday at 12:48 AM Hi, there. I'm trying to edit specific text boxes in a Word document, but I'm running into issues because they're grouped? (I think??) I used the Macro recorder, and it shows: ActiveDocument.Shapes.Range(Array("Group 5")).Select ActiveDocument.Shapes.Range(Array("Text Box 8")).Select Selection.TypeText Text:="Centre" Could some kind soul please tell me how to access these in AutoIt? All assistance gratefully received.
Danyfirex Posted Thursday at 06:05 PM Posted Thursday at 06:05 PM You can get the shape this way: $oDoc.Shapes("Group 5").GroupItems("Text Box 8") Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
ercicttech Posted 1 hour ago Author Posted 1 hour ago On 3/19/2026 at 6:05 PM, Danyfirex said: You can get the shape this way: $oDoc.Shapes("Group 5").GroupItems("Text Box 8") Saludos Thank you for the reply. Sorry I didn't respond before now - I don't get notifications from the forum. I'll give this a try shortly.
ercicttech Posted 1 hour ago Author Posted 1 hour ago Arghh.. I feel like I'm almost there? My lack of knowledge on using "with" is letting me down.. $test = $oDoc.Shapes("Group 5").GroupItems("Text Box 61").Select Highlights the textbox in the Word Document... But how do I change the contents of the text box to be "Hello world"? Or read the current value of that textbox? I've tried $test = $oDoc.Shapes("Group 5").GroupItems("Text Box 61").Select.TypeText $test = $oDoc.Shapes("Group 5").GroupItems("Text Box 61").Select.Text $test = $oDoc.Shapes("Group 5").GroupItems("Text Box 61").Select.TypeText.Text They all return a blank value. I know I'm missing something REALLY obvious!! I've tried using "With ODoc.blah, OWord.blah"... It just throws up errors about the requested action with this object has failed.
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