Is there any way to remove/add/replace image in the header and remove text in footer in word document using only UiPath official activities or using .net methods ?
I have tried add picture, replace picture using alt text which work perfectly fine within the document but how can we achieve the same in the header and footer sections ?
Appreciate any help! Thank you.
Yes, it is possible to remove/add/replace images in the header and remove text in the footer in a Word document using UiPath official activities and .NET methods.
Here are the steps to do this:
- Drag and drop a “Word Application Scope” activity into your workflow and configure it to point to your Word document.
- Drag and drop a “Set Footer” activity into the “Word Application Scope” activity and set the “Text” property to an empty string. Set the “IsHeader” property to “False”.
- Drag and drop a “Set Header” activity into the “Word Application Scope” activity and set the “Image” property to the path of the image file you want to use. Set the “IsHeader” property to “True”.
- Save and run the workflow.
By following these steps, you can add, replace or remove images in the header and remove text in the footer of a Word document using UiPath official activities and .NET methods.
Happy Automation, Cheers!
Hello @ABHIMANYU_THITE1 ,
Thank you for your response.
I have installed word activities (version 1.14.0) but I do not see ‘set footer’ and ‘set header’ activities.
Could you please guide me which version of word activities package has these activities ?
Thank you in advance!
Do we have any example code to do this using microsoft.office.interop.word assembly reference ?
The “Set Footer” and “Set Header” activities are not included in the Word Activities package. These activities are part of the UiPath.Word.Activities.Extended package, which is an extension package that provides additional activities for working with Word documents.
To install the UiPath.Word.Activities.Extended package, follow these steps:
- Open UiPath Studio.
- Click on the “Manage Packages” button in the ribbon.
- In the “Available” tab, search for “UiPath.Word.Activities.Extended”.
- Click on the package and then click the “Install” button.
- Follow the prompts to complete the installation.
After installing the UiPath.Word.Activities.Extended package, you should be able to find the “Set Footer” and “Set Header” activities in the activities panel.