And another question with redlines.... If I iterate over the redlines, how can I accept or reject them?

Sub MainIterateRedLine
Dim oDoc
Dim oViewCursor
Dim oContWin
Dim oRedLines, oRedLine
Dim k%
Dim lRet As Long
Dim sDum$

oDoc = ThisComponent
oViewCursor = oDoc.CurrentController.ViewCursor
oContWin = oDoc.CurrentController.Frame.ContainerWindow

oRedLines = oDoc.Redlines
for k=0 to oRedLines.Count-1
 oRedLine = oRedLines.getByIndex(k)
 oViewCursor.gotoRange(oRedLine.RedlineStart, false)
 oViewCursor.gotoRange(oRedLine.RedlineEnd, true)

 sDum = oRedLine.RedlineType & " " & oViewCursor.String & Chr(10)
 sDum = sDum & "by: " & oRedLine.RedlineAuthor & Chr(10)
sDum = sDum & "at: " & oRedLine.RedlineDateTime.Hours & ":" & oRedLine.RedlineDateTime.Minutes & " " & oRedLine.RedlineDateTime.Day & "." & oRedLine.RedlineDateTime.Month & "." & oRedLine.RedlineDateTime.Year & Chr(10) sDum = sDum & Chr(10) & "Accept (yes), decline (no), or leave as is (cancel) ? " & Chr(10)

 call oContWin.toFront() ' just for convenience when running from Basic IDE
 lRet = msgbox(sDum, 3, "Tracking changes ...")

 select case lRet
 case 6 'yes
 case 7 'no
 end select
 next k

End Sub

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to