I just got the following code from a local programmer. I tried it and it
 works perfectly.

>
> = OpenOfficeElectronicSheet('c:\contable\asientos.xls')
>
>
> FUNCTION OpenOfficeElectronicSheet
> lparameters _cFilePath As String
> Dimension args(1)
> loOfcMgr = Createobject("com.sun.star.ServiceManager")
> loDesktop = loOfcMgr.createInstance("com.sun.star.frame.Desktop")
> loCoreReflection = 
> loOfcMgr.createInstance("com.sun.star.reflection.CoreReflection" )
> loPropertyValue = Createobject("Empty")
> loCoreReflection.forName("com.sun.star.beans.PropertyValue").Createobject(@loPropertyValue)
> args[1] = loPropertyValue
> args[1].Name = "Hidden"
> args[1].Value = .F.
> Comarray(loDesktop,10)
> cTemp = ConvertToURL(_cFilePath)
> loDesktop.loadComponentFromURL(cTemp,"_blank", 0, @args)
>
> ENDFUNC
>
> FUNCTION ConvertToURL(_cFilePath As String) As String
> cTemp = Strtran(_cFilePath,"\", "/")
> cTemp = Strtran(cTemp,":", "|")
> cTemp = Strtran(cTemp," ", "%20")
> cTemp = "file:///" + cTemp
> Return cTemp
> ENDFUNC
>
> Regards
>
> Rafael Copquin
>
>
>
>
> __________ Información de NOD32 4412 (20090909) __________
>
> Este mensaje ha sido analizado con  NOD32 Antivirus System
> http://www.nod32.com
>
> 



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/a87ea1c37bb24d70a0b108b7f64fd...@rafanueva
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to