On Tuesday 05 June 2007, VELTIN Joffrey wrote:
> Hi everyone,
>
> New to this mail list and to OOo community.
>
> Here is my problem:
>
> I want to open a particular document from the active document from which I
> launch the macro. I use this code:
>
> '**************************************************************************
>*****************
>
> Sub OpenFile (FileName as String)
>
> dim args(1) as new com.sun.star.beans.PropertyValue
> dim FilePath, FileToOpen, FileURL as String
> dim TheDoc as Object
>
> FilePath = "C:\MyRecords\"
> FileToOpen= FilePath & FileName & ".ods"
>
> FileURL=ConvertToURL(FileToOpen)
>
> args(0).name="InteractionHandler"
> args(0).value=""
> args(1).name="MacroExecutionMode"
> args(1).value=com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN
> TheDoc=StarDesktop.loadComponentFromURL(FileURL,"_blank",0,args())
>
>
> End Sub
>
> '**************************************************************************
>********************
>
> Now, I would like to get access to this newly opened document... let's say
> I would like to add a column.
> As ThisComponent refers to the initial document, I cannot find a way to
> operate on the new document.. Would you have some suggestions?
> Many thanks!

You should ask on [EMAIL PROTECTED] as it is the best list for using the 
OpenOffice.org API, and ask to be CC:ed as you may not see all replies unless 
you subscribe to that list by sending an email to 
[EMAIL PROTECTED] and reply to the confirmation request email.




-- 
CPH : openoffice.org contributor

Maybe your question has been answered already?
                                http://user-faq.openoffice.org/#FAQ

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

Reply via email to