0

我在Libre Office中创建文件时遇到了最后一行切断问题,但是当我在2013或2016年打开文件时,最后一行内容被截断在之间。查看MS Word文档时最后一行文本被截断

您可以更详细地了解问题。

http://blog.submittable.com/2015/04/last-line-of-text-cut-off-when-viewing-ms-word-documents/

我有搜索网页上有很多的解决方案,但我没有发现任何东西。 是否有任何自动的方式(宏/任何附加) 我可以在文件的末尾添加3-4空输入。

回答

1

以下基本代码从Andrew Pitonyak's Macro document拼凑在一起,尤其是第5.17.1节。

Sub AddParagraphBreaks 
    Dim oCursor As Object 
    Dim oText As Object 
    Dim iBRKConst As Long 
    Dim i As Integer 
    oText = ThisComponent.Text 
    oCursor = oText.createTextCursor() 
    oCursor.gotoEnd(False) 
    iBRKConst = com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK 
    For i = 1 to 3 
     oText.insertControlCharacter(oCursor, iBRKConst, False) 
    Next i 
End Sub