Thanks

Now, after I create my calc object, I want to populate my object with
D:/history.ods file.
How I make it ?

Best regards,
Christophe Mari

----- Original Message ----- 
From: "Mathias Bauer" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, April 15, 2005 8:16 AM
Subject: Re: [api-dev] How-To insert an OLE document into Writer by macro


> Christophe Mari wrote:
> > Hi,
> >
> > I  want to insert an Excel document into a writer document by macro
(basic).
> > I don't find any samples through the net.
>
> Are you sure you mean "Excel"? Or do you want to use "Calc"?
>
> Inserting a Calc object works the following way:
>
> obj=ThisComponent.CreateInstance("com.sun.star.text.TextEmbeddedObject")
> obj.CLSID="47BBB4CB-CE4C-4E80-A591-42D9AE74950F"
> sel = ThisComponent.CurrentController.Selection
> range = sel.getByIndex(0)
> obj.attach( range )
>
> For Excel object you need the OLE ClassID from Excel and of course Excel.
>
> Best regards,
> Mathias
>
> -- 
> Mathias Bauer - OpenOffice.org Application Framework Project Lead
> Please reply to the list only, [EMAIL PROTECTED] is a spam sink.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to