读书人

openoffice怎么把光标跳转到当前段落的

发布时间: 2012-09-03 09:48:39 作者: rapoo

openoffice如何把光标跳转到当前段落的段首或者段尾(宏实现)
Sub Main
oDoc = ThisComponent 'Get the current active document.
oViewCur = oDoc.getCurrentController().getViewCursor()
'msgbox oViewCur.dbg_methods
oTextCur = oDoc.getText().createTextCursorByRange(oViewCur)
'msgbox oTextCur.isStartOfParagraph()
oTextCur.gotoStartOfParagraph(false)

rem oTextCur.gotoStartOfParagraph(false) rem 段尾

'msgbox oTextCur.isStartOfParagraph()

oViewCur.gotoRange(oTextCur,false)
End Sub

读书人网 >OFFICE教程

热点推荐