I'm trying to write a macro, and I need to skip to the next paragraph, where I will test the first letter for capitalization. I've spent hours and have only found inaccurate or hard to follow documentation for something that I think should be simple. Any direction would be appreciated. So far I have:
SUB FIND_PARAGRAPHS
Dim vDescriptor
dim Doc as object
dim Replace as object
dim oCursor
dim Proceed as Boolean
dim CapTest as String
vDescriptor = ThisComponent.createSearchDescriptor()
doc = ThisComponent
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
' test para begin; if capital test previous end
oCursor = Doc.Text.createTextCursor()
Do
oCursor.gotoNextParagraph(false) 'NW
CapTest = oCursor.goRight(1, true) 'NW
if CapTest = ucase(CapTest) Then goto TestPreviousEnd
Loop While CapTest
TestPreviousEnd:
END SUB