1

I'm trying to edit links in the document. Every possible place:

  • textual link (not hyperlinked text)
  • hyperlinked text
  • hyperlinks attached to images
  • links in comments

I've found this thread, but it's only for getting comment's info. I haven't found how to edit comments using pywin32. Since comment's Text is a property, and I haven't see any methods or even private variables to work with comment's text.

In general I'm working with python-pptx, but it seems it doesn't have any comments support. Does anyone know the solution? I faced the same problem with docx files (python-docx also doesn't have comments support), but I've found a "bayoo-docx" fork which adds comments support to python-docx library.

I even tried to work with xml directly through ZipFile, but I only was able to find info about comments. Does anyone have an ideas how to edit them? Again, the main goal is replace links. I mean their textual representation and "target" - the real urls it's refers to.

8
  • Please edit your question to clarify whether you want to modify/add comments or hyperlinks. They're two different things. Commented Nov 27, 2022 at 17:08
  • @SteveRindsberg, I edited the question. I'm talking about replacing links, in comments too. As I can see now SharePoint displays usual text as hyperlink, so replacing the comment's text only should be enough, I suppose. Commented Nov 27, 2022 at 19:32
  • Comments cannot contain links, and I have no idea what you mean by "textual link (not hyperlinked text)". I think you need to use PowerPoint's own terms to describe what you're after and NOT use PowerPoint's terms when you mean something else. Commented Nov 28, 2022 at 16:35
  • @SteveRindsberg, by "textual link (not hyperlinked text)" I mean the URL adress which was pasted into a comment. Since comment's doesn't have hyperlinks, it's just a text. So the more specific question is probably "How to edit comment's text in PowerPoint". Commented Nov 28, 2022 at 18:24
  • 1
    I found that you can edit the text of comments in the XML. There's a Comments folder in the XML that contains the individual comments. The text of the comment is included there and is editable. Commented Dec 1, 2022 at 15:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.