I'm trying to print to "Adobe PDF" (aka Distiller) but the document just spools forever and never prints. I can do it manually, but my VB.NET code can't do it.
Code:
Imports Word = Microsoft.Office.Interop.Word
Dim avmReportWord As New Word.Application
Dim avmReportDoc As Word.Document
avmReportWord.Visible = False
avmReportDoc = avmReportWord.Documents.Add
'Bunch of code here to create paragraphs and text and whatnot
avmReportDoc.SaveAs("c:\AVM_Working_Directory\" & avmReportDocFileName)
Dim oldActivePrinter As String = avmReportWord.ActivePrinter
avmReportWord.ActivePrinter = "Adobe PDF"
avmReportWord.PrintOut(FileName:="" & avmReportDocFileName, Range:=Word.WdPrintOutRange.wdPrintAllDocument, Item:=Word.WdPrintOutItem.wdPrintDocumentContent, PageType:=Word.WdPrintOutPages.wdPrintAllPages, Background:=True, PrintToFile:=False, Copies:=1)
avmReportWord.ActivePrinter = oldActivePrinter