Abrir una hoja de OpenOffice desde VF
Publicado por Andres segundo (3 intervenciones) el 08/05/2008 21:45:55
Necesito por favor ayuda para abrir una hoja de Open Office desde VFP.
Actuamente tengo un programa pero me da error en la linea identificada mas adelante
local array laNoArgs[1]
local loSManager, loSDesktop, loStarDoc, loReflection, loPropertyValue, loCursor
loSManager = createobject( "Com.Sun.Star.ServiceManager.1" )
loSDesktop = loSManager.createInstance( "com.sun.star.frame.Desktop" )
comarray( loSDesktop, 10 )
loReflection = loSManager.createInstance( "com.sun.star.reflection.CoreReflection" )
comarray( loReflection, 10 )
loPropertyValue = createStruct1( @loReflection, "com.sun.star.beans.PropertyValue" )
laNoArgs[1] = loPropertyValue
laNoArgs[1].name = "ReadOnly"
laNoArgs[1].value = .F.
loStarDoc = loSDesktop.LoadComponentFromUrl( "staroffice.factory:swriter", "_blank", 0, @laNoargs )
loCursor = loStarDoc.xls.CreateTextCursor() (Este es el error)
loStarDoc.text.InsertString( loCursor, "HELLO FROM VFP", .f. )
Actuamente tengo un programa pero me da error en la linea identificada mas adelante
local array laNoArgs[1]
local loSManager, loSDesktop, loStarDoc, loReflection, loPropertyValue, loCursor
loSManager = createobject( "Com.Sun.Star.ServiceManager.1" )
loSDesktop = loSManager.createInstance( "com.sun.star.frame.Desktop" )
comarray( loSDesktop, 10 )
loReflection = loSManager.createInstance( "com.sun.star.reflection.CoreReflection" )
comarray( loReflection, 10 )
loPropertyValue = createStruct1( @loReflection, "com.sun.star.beans.PropertyValue" )
laNoArgs[1] = loPropertyValue
laNoArgs[1].name = "ReadOnly"
laNoArgs[1].value = .F.
loStarDoc = loSDesktop.LoadComponentFromUrl( "staroffice.factory:swriter", "_blank", 0, @laNoargs )
loCursor = loStarDoc.xls.CreateTextCursor() (Este es el error)
loStarDoc.text.InsertString( loCursor, "HELLO FROM VFP", .f. )
Valora esta pregunta


0