web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Modify a batch of word...
Power Automate
Answered

Modify a batch of word documents

(0) ShareShare
ReportReport
Posted on 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

I have the same question (0)
  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    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

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    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
    Community Power Platform Member Profile Picture
    on at

    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
    VJR Profile Picture
    7,635 on at

    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
    VJR Profile Picture
    7,635 on at

    @mbeser 

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard