Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在搜索,没有任何结果,所以我会在这里尝试一下。我正在尝试使用 Python 为 OpenOffice 制作文档。我只是找不到如何设置文档的上边距。有人知道如何做到这一点吗?
提前致谢!
像这样的东西似乎对我有用(在 Python 宏上下文中):
import uno def setMargin(): doc = XSCRIPTCONTEXT.getDocument() oStyle = doc.StyleFamilies.getByName("PageStyles").getByName("Default") oStyle.TopMargin = 5000 #Not sure what the units are