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