Ali Ahmadi
Ali Ahmadi

Reputation: 51

how can i open .pdf file in office word 2013(in c#) and save as it in .docx (code in c#)?

I want open Pdf file in c# codes , I want use office word 2013 (Microsoft.Office.Interop.Word) with c# and save as word file in c#, how can I it ?

Upvotes: 0

Views: 2163

Answers (2)

Vijay
Vijay

Reputation: 221

`

Wrdapp= new Word.Application();

FileConverter converter=Wrdapp.FileConverters[5];

//For checking format name
converter.FormatName;

Wrdapp.Open("PDF file path",Format:converter.OpenFormat);`

The file will be converted if the converters are installed with office 2013 and above

Upvotes: 0

Keithin8a
Keithin8a

Reputation: 961

Give the guy a break, it is his first question and he has actually created an account with a picture an everything so I genuinely believe he is here to learn.

I have just done a quick google and it looks as though there is no native support for this, I would suggest you search for a an api to do it. I found this one which gave you code but I have no idea if it is a good framework or not, the code sample they give is a little over complicated imo.

http://www.yiigo.com/guides/csharp/how-to-pdf-convert-word.shtml

If you are genuine then Good Luck. I would recommend looking at the way other people post questions in the future, there are a lot of people on here who help people out and sometimes it is hard to sift through all of the questions where it looks like the asker is wanting people to solve their problems because they can't be bothered.

Upvotes: 3

Related Questions