B
Birke
hi @ all,
i downloaded the plugin for office 2007 for pdf saving. now i have to frite
an vbs script that take 2 parameters. a source file and a destination file.
the task is that the source ppt is transfered in an pdf (pdfa with iso
standard is the final task).
therefore i use the following vbs procedure:
Function Ppt2PDFA(pptFilePath, pdfFilePath)
'definitions for powerpoint export as pdf/a
Const ppWindowMinimized = 2
Const ppFixedFormatTypePDF = 2
Const ppFixedFormatIntentPrint = 2 '(1 for screen; 2 for print)
Dim ppApplication
Set ppApplication = CreateObject("PowerPoint.Application")
ppApplication.Activate
ppApplication.Presentations.Open (pptFilePath)
'Sub ExportAsFixedFormat(
' Path As String,
' FixedFormatType As PpFixedFormatType,
' [Intent As PpFixedFormatIntent = ppFixedFormatIntentScreen],
' [FrameSlides As MsoTriState],
' [HandoutOrder As PpPrintHandoutOrder = ppPrintHandoutVerticalFirst],
' [OutputType As PpPrintOutputType = ppPrintOutputSlides],
' [PrintHiddenSlides As MsoTriState],
' [PrintRange As PrintRange],
' [RangeType As PpPrintRangeType = ppPrintAll],
' [SlideShowName As String],
' [IncludeDocProperties As Boolean = Falsch],
' [KeepIRMSettings As Boolean = Wahr],
' [DocStructureTags As Boolean = Wahr],
' [BitmapMissingFonts As Boolean = Wahr],
' [UseISO19005_1 As Boolean = Falsch],
' [ExternalExporter])
'=== CRITICAL LINE ===>>
ppApplication.Presentations.Application.ActivePresentation.ExportAsFixedFormat pdfFilePath, ppFixedFormatTypePDF
ppApplication.Quit
End Function
the marked line is the critical line because here o get the following message:
"Laufzeitfehler in Microsoft VBScript: Typen unverträglich:
'ExportAsFixedFormat' "
this means type missmatch for 'ExportAsFixedFormat'. i can make sure that
the first parameter IS a string.
when i try this in VB then i will get a correct result. not this error.
what is the fault ???
thx for any helpfull hint or solution.
i downloaded the plugin for office 2007 for pdf saving. now i have to frite
an vbs script that take 2 parameters. a source file and a destination file.
the task is that the source ppt is transfered in an pdf (pdfa with iso
standard is the final task).
therefore i use the following vbs procedure:
Function Ppt2PDFA(pptFilePath, pdfFilePath)
'definitions for powerpoint export as pdf/a
Const ppWindowMinimized = 2
Const ppFixedFormatTypePDF = 2
Const ppFixedFormatIntentPrint = 2 '(1 for screen; 2 for print)
Dim ppApplication
Set ppApplication = CreateObject("PowerPoint.Application")
ppApplication.Activate
ppApplication.Presentations.Open (pptFilePath)
'Sub ExportAsFixedFormat(
' Path As String,
' FixedFormatType As PpFixedFormatType,
' [Intent As PpFixedFormatIntent = ppFixedFormatIntentScreen],
' [FrameSlides As MsoTriState],
' [HandoutOrder As PpPrintHandoutOrder = ppPrintHandoutVerticalFirst],
' [OutputType As PpPrintOutputType = ppPrintOutputSlides],
' [PrintHiddenSlides As MsoTriState],
' [PrintRange As PrintRange],
' [RangeType As PpPrintRangeType = ppPrintAll],
' [SlideShowName As String],
' [IncludeDocProperties As Boolean = Falsch],
' [KeepIRMSettings As Boolean = Wahr],
' [DocStructureTags As Boolean = Wahr],
' [BitmapMissingFonts As Boolean = Wahr],
' [UseISO19005_1 As Boolean = Falsch],
' [ExternalExporter])
'=== CRITICAL LINE ===>>
ppApplication.Presentations.Application.ActivePresentation.ExportAsFixedFormat pdfFilePath, ppFixedFormatTypePDF
ppApplication.Quit
End Function
the marked line is the critical line because here o get the following message:
"Laufzeitfehler in Microsoft VBScript: Typen unverträglich:
'ExportAsFixedFormat' "
this means type missmatch for 'ExportAsFixedFormat'. i can make sure that
the first parameter IS a string.
when i try this in VB then i will get a correct result. not this error.
what is the fault ???
thx for any helpfull hint or solution.