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,


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.



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


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:

Hope they helps.
Best regards,




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,


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