Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,
I am trying to export documents to pdf. I have a macro which worked
most of the time using OOo, but it does not work in LO.
I use this code..
--- cut ---
  cDestFile = Left(cSourceFile, Len(cSourceFile) - 4) + "pdf"
  cDestURL = ConvertToUrl( cDestFile )
  Dim oExportOptions(4) as New com.sun.star.beans.PropertyValue
  oExportOptions(0).name = "FilterName"
  oExportOptions(0).value = "writer_pdf_Export"
  oExportOptions(1).name = "Author"
  oExportOptions(1).value = "..."
  oExportOptions(2).name = "Comment"
  oExportOptions(2).value = "..."
  oExportOptions(3).name = "DocumentTitle"
  oExportOptions(3).value = "..."
  oExportOptions(4).Name = "Overwrite"
  oExportOptions(4).Value = True
  oDoc.storeToURL( cDestURL, oExportOptions )
--- cut ---

However, in my experiance this only worked in OOo when the
"SaveFileAs" dialog showed pdf as a format to "save as".
When OOo did not had this option, the macro would not work either.
None of my LO installations have this SaveAs format and the macro
fails in all of my LO installations.
I know there was another way to export to pdf (using "export" instead
of "save as") - but I can't find it anymore...

Any ideas/suggestions ?

Yours,
Nils

-- 
Unsubscribe instructions: E-mail to users+help@libreoffice.org
List archive: http://listarchives.libreoffice.org/www/users/
*** All posts to this list are publicly archived for eternity ***

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.