从pptx.enum.action导入PP_操作

2024-04-19 22:25:56 发布

您现在位置:Python中文网/ 问答频道 /正文

我只想在我的pptx中添加Hiperlink,因此我发现我必须添加以下代码:

r.text = 'link to python-pptx @ GitHub'
hlink = r.hyperlink
hlink.address = 'https://github.com/scanny/python-pptx'

我所了解的是.add_run()来自模块:来自pptx.enum.action import PP_action,但我的程序在pptx.enum中找不到模块操作,有人知道出了什么问题吗? 多谢各位


Tags: 模块to代码texthttpsgithubaddresslink