Mam dokument z piecioma paragrafami.
W jaki sposob zaznaczyc cursorem od pierwszego do trzeciego paragrafu (w celu zmiany np wielkosci czcionki)??
oCur.gotoNextParagraph(true) ' Property or method not found gotoNextParagraph
Kod: Zaznacz cały
Dim oServiceManager
Dim oDesktop
Dim oDoc
Dim oText
Dim oCur
Dim aLoadArgs()
Set oServiceManager = CreateObject("com.sun.star.ServiceManager")
Set oDesktop = oServiceManager.createInstance("com.sun.star.frame.Desktop")
Set oDoc = oDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, aLoadArgs())
Set oText = oDoc.Text
Set oCur = oDoc.CurrentController.GetViewCursor
oText.InsertString(oCur,"Line1" + chr(13) + "Line2" + chr(13) + "Line3" + chr(13) + "Line4",false)
oCur.gotoStart(false)
oCur.gotoNextParagraph(true) ' Property or method not found gotoNextParagraph
oCur.gotoNextParagraph(true) ' Property or method not found gotoNextParagraph
oCur.gotoNextParagraph(true) ' Property or method not found gotoNextParagraph