Need Help Adding Dynamic Stamp from Template Word File to Multiple .doc Files in UiPath

Hi All,

I have a use case where I need to add an “OBSOLETE” stamp into multiple Word .doc files dynamically using UiPath.

Current approach:

  • I have a template Word file containing the stamp textbox/shape with specific formatting (font, border thickness, color, positioning, etc.)

  • Target files are old .doc documents coming from different sources

  • The stamp content contains dynamic values like:

    • Replaced By
    • Log Ref
    • Date
    • User Name

Requirement:

  • Open target .doc file
  • Copy the stamp object from the template Word file
  • Paste it into the target document at a fixed position
  • Update the dynamic text values inside the stamp
  • Save and close the document

Challenges:

  • Need to preserve exact formatting and positioning of the stamp
  • Documents are legacy .doc files
  • Process should work for bulk documents
  • Avoid manual interaction/popups

Has anyone implemented something similar in UiPath or Word automation?
Looking for the most stable and scalable approach.

Thanks!
Template.doc (26.5 KB)

Use Word Application Scope in UiPath to open both the template and target .doc files, copy the “OBSOLETE” textbox/shape from the template, paste it at a fixed bookmark/location, update the dynamic values, and save the file.

For better stability in bulk processing, use Word COM/Invoke VBA, disable Word alerts, and preferably convert .doc to .docx during processing.

You can use a Word template approach for this.

  • Keep the stamp placeholder in the template file
  • Loop through all Word documents
  • Use Replace Text / Replace Image / Bookmark activities to add the stamp dynamically

Example:

Directory.GetFiles("FolderPath","*.docx")

This is easier and more scalable when working with multiple documents.

Advice : Try creating a fresh copy of the template each iteration to avoid overwriting the original template:
You may also consider using bookmarks/placeholders for exact stamp positioning instead of relying only on coordinates/manual placement.

Hi @Dinesh_Babu_S

Copying a textbox/shape from one Word file to another is possible, but it’s not very stable in UiPath, especially with old .doc files. A simpler and more reliable approach is to save your stamp as an image and insert it into each document using the Insert Picture activity, then update the dynamic values using Find & Replace. If you strictly need the exact textbox formatting, then you’ll have to use Invoke VBA to copy and paste the shape, but that is a bit complex. For better stability, it’s also a good idea to convert .doc files to .docx before processing.