Skip to main content
Solved

MS Word - Team, Let’s say if I want to replace text within tables, and not use keystrokes.

  • July 21, 2025
  • 3 replies
  • 73 views

Forum|alt.badge.img+1

Team,

Let’s say if I want to replace text within tables in MS Word, and not use keystrokes, what is the best way to go about this in AA?

 

 

Best answer by poonamindure

Team,

Let’s say if I want to replace text within tables in MS Word, and not use keystrokes, what is the best way to go about this in AA?

 

 

Use Word Package with Bookmarks

Insert bookmarks inside table cells in your Word template

  • Use AA’s Microsoft Word Package > Insert Text at Bookmark action

  • This allows targeted replacement without keystrokes

3 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+14
  • Automation Anywhere Team
  • July 21, 2025

@Hiren Savla Word is not really structured so keystrokes for find/replace is usually the right answer. You could build a PowerShell script that opens the Word file and performs the replaces, too, but you're not far ahead of just using keystrokes.

OLE could be used if you double click on the tables if they were inserted from another source, like Excel, but I would not bet on that working well. This is because OLE links are easily broken in Windows and you would probably still have to use keystrokes in the embedded application. 

Have you considered the reverse? Creating the table in Excel then OLE linking it to the Word doc? Still probably not a great idea. 😅

If you REALLY wanted to push the envelope, DOCX files are zip files containing XML. You could parse and update the XML and update the zip (DOCX) file... not an easy option but doesn't use keystrokes or OLE. 


Forum|alt.badge.img+4
  • Navigator | Tier 3
  • Answer
  • July 22, 2025

Team,

Let’s say if I want to replace text within tables in MS Word, and not use keystrokes, what is the best way to go about this in AA?

 

 

Use Word Package with Bookmarks

Insert bookmarks inside table cells in your Word template

  • Use AA’s Microsoft Word Package > Insert Text at Bookmark action

  • This allows targeted replacement without keystrokes


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+14
  • Pathfinder Community Team
  • July 23, 2025

@Hiren Savla have any of these suggestions helped? Please mark best answer if they did!