Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 7bFFT6TN2GUxq2OGWzTiQf
Power Automate - Power Automate Desktop
Answered

Modify a batch of word documents

Like (0) ShareShare
ReportReport
Posted on 21 Sep 2021 18:42:27 by 14

Hello everyone.

 

I am new with Power Automate Desktop and i'm looking for a automation flow.

 

I have a document folder, which includes .ie 100 Word documents. In manually i need;

 

1. Open each word documents

2. Change the fonts ie Arial 12

3. Save the document.

 

Can i do this with power automate, without manual operations?


Thanks

  • Verified answer
    VJR Profile Picture
    7,635 on 26 Sep 2021 at 04:02:58
    Re: Modify a batch of word documents

    @mbeser 

    PS: I can help you with the macro in case you need.

  • Verified answer
    VJR Profile Picture
    7,635 on 24 Sep 2021 at 10:25:03
    Re: Modify a batch of word documents

    Hello @mbeser 

     

    As per your note if you want to do it without manual operations then you can

    - Write an Excel macro that changes the font of Word documents (tons of readymade code easily available on the web)

    - And then call that macro from within PAD.

    VJR_0-1632479061289.png






    -------------------------------------------
    Help fellow beings find relevant posts.
    Upvote to a supporting response.
    Mark as solution to an answer.

  • Verified answer
    Community Power Platform Member Profile Picture
    on 22 Sep 2021 at 13:08:58
    Re: Modify a batch of word documents

    Hello @mbeser 

     

    You can use keyboard shortcut "Alt - H - FF" to focus into the combobox of font name in the ribbon of Word app.

     

    Below is my sample flow that meets your requirement.

     

     

    Folder.GetFiles Folder: $'''C:\\Users\\User01\\Documents\\Word Files''' FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
    SET FontName TO $'''Verdana'''
    SET FontSize TO 12
    LOOP FOREACH CurrentItem IN Files
     System.RunApplication ApplicationPath: $'''C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE''' CommandLineArguments: $'''/t \"%CurrentItem.FullName%\"''' WindowStyle: System.ProcessWindowStyle.Normal ProcessId=> AppProcessId
     WAIT (UIAutomation.Windows.ToOpenByTitleClass Title: $'''%CurrentItem.NameWithoutExtension%*''' Class: $'''''' FocusWindow: True)
     MouseAndKeyboard.SendKeys TextToSend: $'''{Control}({A})''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
     MouseAndKeyboard.SendKeys TextToSend: $'''{Alt}(){H}{F}{F}%FontName%{Tab}%FontSize%{Tab}''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
     MouseAndKeyboard.SendKeys TextToSend: $'''{Alt}({F4}){Return}''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
    END

     

     

    shindomo_4-1632315425373.png

    Launch WINWORD.EXE application with /t switch to open your file.

     

    shindomo_1-1632315322367.png


    Wait until window of Word application which has your file name in title bar will open.

     

    shindomo_2-1632315356188.png

     

    Then send keys what ever as you like.

     

    shindomo_3-1632315371095.png

     

    Thank you.

  • Verified answer
    MichaelAnnis Profile Picture
    5,721 Super User 2025 Season 1 on 21 Sep 2021 at 19:58:48
    Re: Modify a batch of word documents

    You could even use Save As instead of just Save, and save the new version to another folder, then delete the old version; that way if something goes wrong, you will know which ones are done and which ones aren't.

  • Verified answer
    MichaelAnnis Profile Picture
    5,721 Super User 2025 Season 1 on 21 Sep 2021 at 19:57:14
    Re: Modify a batch of word documents

    Get Files

    For each %CurrentItem% in Files

    Launch Word Open:  %CurrentItem%

    Use the Desktop Recorder to use the menu to Select All, Arial Font, size 12

    Save and Close Word

    End #For Each

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 18 Super User 2025 Season 1

#2
Nived_Nambiar Profile Picture

Nived_Nambiar 10 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 6

Overall leaderboard