Bon, voila mon problème : je travaille sur OOo v1.0.3
et je veux insérer un pied de page à mon document par
l'intermédiaire d'une macro. C même encore plus simple
que ca car le pied de page est déjà créé dans un autre
document. J'ai essayé le code suivant : (oLFooter est
le pied de page que je veux modifier, oLFooterOrg est
le pied de page de l'autre document)

        oLFooter = oPageStyle.LeftPageFooterContent
        oRFooter = oPageStyle.RightPageFooterContent
        oStyleFamiliesOrg = oDocPatron.getStyleFamilies()       
        oPageStyleOrg =
oStyleFamiliesOrg.getByName("PageStyles").getByName("Default")
        oLFooterOrg = oPageStyleOrg.LeftPageFooterContent
        oRFooterOrg = oPageStyleOrg.RightPageFooterContent              
        oRTextOrg = oRFooterOrg.getCenterText()
        oCursorOrg = oRTextOrg.createTextCursor()
        oRText = oRFooter.getCenterText()
        oCursor = oRText.createTextCursor()
        oCursorOrg.gotoStart(false)
        oCursorOrg.gotoEnd(true)
        print(oLTextOrg.getString())
        oCursor.gotoStart(false)
        oRText.setString(oRTextOrg.getString())
        print(oRText.getString())
        oCursor.gotoStart(false)
        oCursor.gotoEnd(true)

        oCursor.CharFontName = oCursorOrg.CharFontName
        oCursor.CharUnderlineColor =
oCursorOrg.CharUnderlineColor
        oCursor.CharFontStyleName =
oCursorOrg.CharFontStyleName
        oCursor.CharFontFamily = oCursorOrg.CharFontFamily
        oCursor.CharFontCharSet = oCursorOrg.CharFontCharSet
        oCursor.CharFontPitch = oCursorOrg.CharFontPitch
        oCursor.CharColor = oCursorOrg.CharColor
        oCursor.CharHeight = oCursorOrg.CharHeight
        oCursor.CharUnderline = oCursorOrg.CharUnderline
        oCursor.CharWeight = oCursorOrg.CharWeight
        oCursor.CharPosture = oCursorOrg.CharPosture
        oCursor.CharLocale = oCursorOrg.CharLocale
        oCursor.CharUnderlineColor =
oCursorOrg.CharUnderlineColor
        oCursor.CharUnderlineHasColor =
oCursorOrg.CharUnderlineHasColor  
        oPageStyle.HeaderIsOn = False
        oPageStyle.FooterIsOn = True

Je ne comprends pas pourquoi ca ne marche pas.
L'affichage du contenu de oRText avec le print donne
bien le bon résultat mais le pied de page de mon
document reste inchangé. Est ce que qqun voit pourquoi
ca ne fonctionne pas ?

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


______________________________________________________________
staroffice.dev : pour les développeurs.  www.staroffice-fr.com
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Pour savoir gérer votre inscription, envoyez un courriel à
[EMAIL PROTECTED] avec comme sujet : info 
 
        

Répondre à