How to convert .eml file to pdf?


I was able to open the file with word and print manually. However if I try to do the same using my .net code the code simply hangs at the following line

            while (pdfCreator.cCountOfPrintjobs != 1) ;

Note: I changed the default application to word for opening the .eml file (File association)

Any idea why it is not working?