Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index


Bonsoir,

A priori je dirais que lorsque vous mettez l'attribut Bold ou la couleur
rien n'est sélectionné. Mais ce n'est qu'une hypothèse.

Thierry



Le dim. 11 nov. 2018 à 17:22, <demande_aide_fr@libreoffice.org> a écrit :

Bonjour

Voici une nouvelle question envoyée à l'aide du formulaire de demande
d'aide (http://fr.libreoffice.org/get-help/poser-une-question/).
Si vous répondez, merci de penser à utiliser la fonction "répondre à tous"
de votre logiciel de courrier électronique de façon que le demandeur
reçoive une copie de votre réponse.


Email:: gilles.massardier@net-c.com
Sujet:: macro
OS:: Linux
Version:: 6.1.x
Question:: J'ai enregistré une macro :
insertion d'un caractère spécial puis mise en gras et mise en couleur...
mais quand j'exécute la macro, l'insertion du caractère se fait mais pas la
mise en forme. Pourtant dans la macro l'ensemble des demandes est
enregistré...

voici la macro en question...

sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Text"
args1(0).Value = " "

dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(1) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Symbols"
args2(0).Value = "†"
args2(1).Name = "FontName"
args2(1).Value = "Liberation Serif"

dispatcher.executeDispatch(document, ".uno:InsertSymbol", "", 0, args2())

rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:InsertSymbol", "", 0,
Array())

rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Bold"
args4(0).Value = true

dispatcher.executeDispatch(document, ".uno:Bold", "", 0, args4())

rem ----------------------------------------------------------------------
dim args5(0) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Color"
args5(0).Value = 255

dispatcher.executeDispatch(document, ".uno:Color", "", 0, args5())


end sub

quelqu'un sait-il ou est le problème???

merci

Gilles


--
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour vous
désinscrire
Les archives de la liste sont disponibles à
https://listarchives.libreoffice.org/fr/users/
Privacy Policy: https://www.documentfoundation.org/privacy


-- 
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour vous désinscrire
Les archives de la liste sont disponibles à https://listarchives.libreoffice.org/fr/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.