question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I access manipulate text that is placed in a shape in a document.

See original GitHub issue

Someone has drawn a shape in a document that I need to manipulate. I iterated over all the inline_shapes and can’t see to get to the text within each of the results. I was able to confirm the text exists in the doc using BeautifulSoup and pulling out the XML node the text is in. I also confirmed the text is not part of the tables or the paragraphs objects in the doc.

  1. Is there a way to pull text from within a shape in a doc
  2. If not, is there a way to manipulate the XML directly?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
scannycommented, Sep 21, 2021

Okay, I think I worked out what you were talking about on your StackOverflow question. Btw, please do not double-post. Support questions are best placed on StackOverflow just because they come up better on search. Also this list is really reserved for actionable items like feature requests or suspected bugs.

0reactions
Laxmi530commented, Jun 24, 2022

Well, I assume the element, but the goal is to remove the part of the Word document so there is no residuals left over (space, bullet, text, new lines etc). For example:

Original

[Shape Starts] [line 1] Hello [line 2] World [line 3] - Something [line 4] more [Shape ends]

After

[Shape Starts] [line 1] [line 2] [line 3] - [line 4] more [Shape ends]

Wanted

[Shape Starts] [only line] more [Shape ends]

How to remove the None. It is getting repeated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrap text inside a shape - Microsoft Support
On the Insert tab, in the Illustrations group, click Shapes, and then click the shape that you want. · Drag to create the...
Read more >
Text in Shape ❤️ in Microsoft Word - YouTube
Text wrap tutorial: https://youtu.be/gId5_6A8OBMLearn how to put text inside any shape in Microsoft Word. Simple, easy to follow tutorial.
Read more >
Google Docs: Inserting Text Boxes and Shapes - GCF Global
Click the Text box command. ... Click and drag in the drawing area to create the text box. ... Release the mouse, and...
Read more >
Edit a the text in a Shape(textbox) that is placed somewhere ...
This is code you could use, I was able to just figure out the answer. What the code does is checks that the...
Read more >
Add and replace text in Pages on Mac - Apple Support
You can modify this default style—change the font, font color, color fill, and so on—then make it the new default style for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found