Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

Save word document as pdf

$
0
0

Hello,

Office 2007 installed and PDFConverter installed.
I opened word programmatically and when i try to save word file as pdf file as the following code i accept the following exception :

 

object oFileFormat= 17;// PDF
oPrintDoc.Application.Visible = false;
oPrintDoc.SaveAs(
ref oTmpPdfFile,ref oFileFormat,ref missingValue,
ref missingValue,ref missingValue,ref missingValue,
ref missingValue, ref missingValue,ref missingValue,
ref missingValue,ref missingValue,ref missingValue,ref missingValue,ref missingValue,ref missingValue,
ref missingValue);

System.Runtime.InteropServices.COMException (0x800A1066)

at Microsoft.Office.Interop.Word.DocumentClass.SaveAs(Object& FileName, Object& FileFormat, Object& LockComments, Object& Password, Object& AddToRecentFiles, Object& WritePassword, Object& ReadOnlyRecommended, Object& EmbedTrueTypeFonts, Object& SaveNativePictureFormat, Object& SaveFormsData, Object& SaveAsAOCELetter, Object& Encoding, Object& InsertLineBreaks, Object& AllowSubstitutions, Object& LineEnding, Object& AddBiDiMarks)

What is the problem ?

Thnx,
khalil


Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>