Hello,
I'm trying to import an impress document in an other impress document but it failed, i don't know how to do it :(

I've tried this :

Sub InsertCours(cSrc,cDest)

    Dim MonDocument As Object
    dim dispatcher as object
    Dim PropFich()


    cUrlSrc = ConvertToURL(cSrc)
    cUrlDest = ConvertToURL(cDest)

    '----------------------------------------
    ' Ouverture du fichier destinataire
    '----------------------------------------
MonDocument = StarDesktop.LoadComponentFromURL(cUrlDest,"_blank",0, PropFich)
    dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

    MonDocument   = ThisComponent.CurrentController.Frame
    '----------------------------------------
    'Importation du fichier source
    '----------------------------------------
    dim args1(1) as new com.sun.star.beans.PropertyValue
    args1(0).Name = "Name"
args1(0).Value = "file:///home/jguenver/testmacros/modele_debut_cours.odp"
    args1(1).Name = "Filter"
    args1(1).Value = "impress8"
dispatcher.executeDispatch(MonDocument, ".uno:InsertDoc", "", 0, args1())


End Sub


There is no error, but it doesn't works :-(
Someone can help me please ?

Regards,
Jérôme.

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

Reply via email to