To get font size, font type of a specific text in a word document

HI there,

I have a requirement where i should get font size, font type and text alignment of specific text from a word document.
Appreciate your response and Thanks In advance. Cheers

1 Like
  • Open the word document from where the format has to retrieved.
  • Click Ctrl+F to search for the Specific text for which you want the format.
  • Click on the text
  • Now use text text activity to retrieve font size, font type from the menu bar.
  • Use get attribute activity to get text alignment details by specifying “aaname” in attribute property and selector as
    Capture

Hope this is helpful!

Thank you @Madhavi. Will try and let you know.

1 Like

Hi Madhavi,
How are you? I hope you can give me some direction. My requirement is this:

  • Read a specific column in an excel spreadsheet
  • Open each hyperlink in a column (let’s say column D) which opens a new application
  • Hit the Print button
  • Do this for all the rows in the column

Can you please suggest how to go about this? Any help would be appreciated.

@JJ31,

Follow below steps:

  1. First take read range activity inside Excel Application Scope and it will give output as DataTable.
  2. Then iterate dataTable using For Each Row
    a) Take Start Process activity and pass row(“Column D”).toString
    b) Send Hot key ctrl+p
    end loop.

Regards,
Lakshman Ganta.

@JJ31

  • If your requirement is only to get data from specific column, use read column activity (say output as Column_Data). If you are using other column values as well then use read range
  • Use For each Loop to loo through the Column_Data. Specify Target type in properties as string. In for each, each item is represented by the variable named “item”. You can change this if you like. (lets keep it as LINK for now)
  • Use Open browser activity and specify the LINK in URL property
  • Send hot key ctrl + p to open printer window.
  • Do print actions
  • Use Close tab activity to close the current window. (Use this within Open browser activity)

Hope this will be helpful!

Hi Madhavi, what is “text text” activity? I failed to find it in UiPath.

He might of was referring to the “Get Full Text” activity, but just a guess

The most simple method of modifying only one part of an MS-Word document to create a different font type and add it to one specific section of the MS-Word document. The font size has to be changed. "What’s the theme, if you ask? "Pick only the individual element in question and adjust the font size explicitly. The term is “direct formatting,” but in case of beginner Word users, the Microsoft code does not come after you for direct formatting. It’s typically frowned upon by experienced MS Word users and Microsoft. In fact, whether you use some portion of the Microsoft Office for business, a class or two on using MS Word properly will pay for itself in future proper use and will possibly impress any clients you communicate with.