Bonjour
Si tu nommes ton diagramme par clic droit sur le diagramme > Nom, tu peux
y accéder (relativement) simplement de cette façon (le diagramme cherché
a été nommé "test" dans cet exemple) :
sub PysCopierGraphe
dim oClasseur as Object, oFeuille as Object, oShape as object
dim document as object, dispatcher as object
dim iNbShape as integer
oClasseur = thisComponent
oFeuille = oClasseur.sheets.getByName("Feuille1")
for iNbShape = 0 to oFeuille.DrawPage.count - 1
oShape = oFeuille.DrawPage.getByIndex(iNbShape)
if oShape.name = "test" then
thiscomponent.currentcontroller.select(oshape)
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
exit for
end if
next iNbShape
end sub
Cordialement
Pierre-Yves
--
View this message in context:
http://nabble.documentfoundation.org/Macro-pour-copier-un-diagramme-fait-dans-Calc-dans-un-tableau-de-Writer-tp4143484p4143525.html
Sent from the Users mailing list archive at Nabble.com.
--
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour savoir comment vous désinscrire
Les archives de la liste sont disponibles à http://listarchives.libreoffice.org/fr/users/
Tous les messages envoyés sur cette liste seront archivés publiquement et ne pourront pas être
supprimés
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.