On Sun, 15 Oct 2006 22:20:51 +1000, Terry wrote:
> Macro code travels badly by email, so I have uploaded a text document
> containing a model macro to reverse font colours:
> http://www.mytempdir.com/992950
Haaaaahhhhh!! Excellent!! Thank you!
I inspired myself from your code, I putzed around a bit to make it work
and voila. I hope this helps you more than the examples on the API site.
There is nothing simple there.
sub HideAnswers
rem -------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
Dim paraStyles as object
Dim charStyles as Object
Dim pStyle as object
Dim cStyle as Object
Dim nWhite as Long
nWhite = RGB( 255, 255, 255 )
rem -------------------------------------------------------------
rem get access to the document
document = ThisComponent
paraStyles = document.StyleFamilies.ParagraphStyles
charStyles = document.StyleFamilies.CharacterStyles
rem -------------------------------------------------------------
pStyle = paraStyles.getByName("Text body empty")
pStyle.setPropertyValue("CharColor", nWhite)
cStyle = charStyles.getByName("Answer")
cStyle.setPropertyValue("CharColor", nWhite)
cStyle = charStyles.getByName("Answer no underline")
cStyle.setPropertyValue("CharColor", nWhite)
end sub
Thanks!
L
--
Prenez la parole en public en étant Speak to an audience while being
moins nerveux et plus convaincant! less nervous and more convincing!
Éveillez l'orateur en vous! Bring out the speaker in you!
Information: [EMAIL PROTECTED] http://www.duperval.com (514) 902-0186
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]