Code: Select all
Sub exportpdf( cFile )
cURL = ConvertToURL( cFile )
' Open the document. Just blindly assume that the document
' is of a type that OOo will correctly recognize and open
' without specifying an import filter.
oDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, _
Array(MakePropertyValue( "Hidden", True ),))
cFile = Left( cFile, Len( cFile ) - 4 ) + ".pdf"
cURL = ConvertToURL( cFile )
' Save the document using a filter.
oDoc.storeToURL( cURL, Array(_
MakePropertyValue( "FilterName", "writer_pdf_Export" ),)
oDoc.close( True )
End Sub
"A Scripting Framework error occured while running the Basic script ynd.sun.star.script:Standard.Module1.Example?Language=Basic&location=application
Message: BasicProviderlmpl::getScript: no script!"
I dont feel like that the code would be the source of problem but i still dont know where it comes from...