I am already facing issues with working on pptx files since 1 week. I want to detect the title of the presentations, which are given in the first slide. For my solution I started to get the first page and check up the title for any special characters which help me to indicate, that the title is finished.
However if there is a multiline title on slide 1, UiPath can detect the text and show me in debug sth like
[Text text text
text]
if i try to split this text by newline (e.g split(Environment.Newline) or split(vbCrLf) ) I dont get any splitted text. It looks like UI Path cant recognize that there is a linebreak.
I hope anyone of you was facing the same issue and knows any solution to split these textboxes.
You can use the Get Text or Get OCR Text activities in UiPath to extract the text from a specific element within the PowerPoint slide, which may help you capture the line breaks correctly.
Here’s steps:
Use the “Open Application” activity to open the PowerPoint presentation.
Use a “Click” activity or another method to navigate to the first slide.
Use the “Get Text” or “Get OCR Text” activity to extract the text from the first slide. Configure it to capture the text from the specific element that contains the title.
This approach allows you to extract text in a way that respects the formatting of the text box in PowerPoint, including any line breaks. Once you’ve extracted the text, you can then process it further in UiPath, such as splitting it by newline characters or other delimiters.
Thanks for your fast reply. I will implement and try it later. But how does it could be, that UiPath shows me something like a newline in the debugmode (text will be put to nextline without reaching end of line), if there is no findable newline character in this text? Do I miss maybe a method to say “newline”, is there any other coding method to say it’s a newline character similar to Environment.Newline or vbCrLf?
If UiPath is displaying text in debug mode with what appears to be a newline, but you’re unable to split it with standard newline characters like Environment.NewLine or vbCrLf, it’s possible that the text may contain special characters that represent line breaks, but they are not traditional newline characters.
In PowerPoint, when you press Enter within a text box, it doesn’t necessarily create a newline character in the same way as a text file or a plain text editor. Instead, it might insert special formatting characters that represent line breaks within the text box.
Hi again @Praveen_Mudhiraj
your knowing bring me to think again about it. Searching the web shows me that Powerpoint often uses Chr(11) and Chr(10) for newline feeds. I tried it out and get positive solutions with Chr(10).