-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Stefan,

> (1) File | Export to PDF...
> (2) Give file name and destination
> (3) Klick "Save"
> (4) Choose Range|Selection

uups, i forgot to mention, that i was looking for a starbasic script  ...

but this one seems not to work:

Sub PDFExport()

        On Local Error Goto ErrorHandler
        
        Dim oDocument as Object
        Dim exportPath as String
        Dim i as Integer
        Dim mArgs(4) as new com.sun.star.beans.PropertyValue

        exportPath = "E:\"      

        mArgs(0).Name = "FilterName"
        mArgs(0).Value = "calc_pdf_Export"

        mArgs(1).Name = "Overwrite"
        mArgs(1).Value = True

        mArgs(2).Name = "SelectionOnly"
        mArgs(2).Value = True

        oDocument = ThisComponent

        For i = 0 To oDocument.getSheets().getCount()-1
                oDocument.storeToURL(ConvertToURL(exportPath & 
oDocument.getSheets().getByIndex(i).getName()) &
".pdf", mArgs())
        Next i
        
        Exit Sub

ErrorHandler:
        MsgBox("Fehler: " & Err() & Chr(13) & "Zeile: " & Erl() & Chr(13) & 
Error(), 1+16, "Fehler beim
Export")
                
End Sub


I am looking for something like:

mArgs(2).Name = "Sheets"
mArgs(2).Value = "1,2,5-7"

Oliver

- --

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFEsJqTiyrQM/QSkURAuFmAJ0UrmNUnzGg2Qddt6WBYBbQXW+V7ACfa638
qp21lWK+lZj7JX9e/eoJdLE=
=MyAw
-----END PGP SIGNATURE-----

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

Reply via email to