Home » C++ ProgrammingRSS

To save a word 2003 file to PDF format

How can I save or convert a word 2003 file to PDF format?

Is there a way that i can save a doc file to PDF format through vb.net?

I try to use : "office.Word.WdSaveFormat.wdFormatPDF" but didn't work.

tks - Lu
I use VB2005

 

 

6 Answers Found

 

Answer 1

Hello silvestre_lu,
Thanks for your post.
You'd better use a third part component to do this. Have you tried iTextSharp? You can use iTextSharp library which is free and will help you to achieve this.

Best regards,
Liliane

 


Please mark the replies as answers if they help and unmark them if they provide no help. Thanks
 

Answer 2

Open the file in Word 2007 or 2010 and then save as PDF.  Use interop to control Word from VB.
 

Answer 3

I found this component iTextSharp and I saw that its possible to create a pdf but I want to convert a doc file to pdf.
I need to convert a doc file (word 2003) to pdf.

i found a person that tried to convert a html file to pdf using iTextSharp.

Do you have an exemple to convert doc in pdf format using this component ?

Tks again.

Luciana

 

Answer 4

Hello silvestre_lu,
Thanks for your post.
You could first try to Convert Doc to HTML and then convert HTML to PDF. See the following articles to convert word document to HTML file

http://www.c-sharpcorner.com/UploadFile/munnamax/WordToHtml03252007065157AM/WordToHtml.aspx
http://www.wherecanibuyit.co.uk/ASP/converting_word_doc_files_to_html.html

But, both are in C#, you have to convert the code to VB.Net and then use in your application.
Convert C# to VB.NET: http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx

I searched another Doc Converter COM Component which may be helpful for you to convert doc to pdf directly. Here is its toturial:
http://www.verypdf.com/pdfcamp/doc2pdf_readme.html

Hope they helps.
Best regards,
Liliane


 

 

 

Answer 5

Hello again silvestre_lu,
When you come back, please have a try. If you think it provide no help, please unmark. Thanks. If you still have any problems, please feel free to follow up.

Best regards,
Liliane

 

Answer 6

i used a virtual printer to save a file doc 2003 to pdf .

i think is the better way to do this.

i developed a code to create and install the virtual printer in the machine that my program is run and then I load it and save doc in pdf.

tks everybody for help me.

 

 

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter