Update 20241215
This commit is contained in:
@@ -30,6 +30,22 @@ namespace OfficePrinter
|
||||
return;
|
||||
}
|
||||
|
||||
public void PrintInWord(string Filename, string printmacro)
|
||||
{
|
||||
Application appWord = new Application();
|
||||
Microsoft.Office.Interop.Word.Document wordDocument = new Microsoft.Office.Interop.Word.Document();
|
||||
wordDocument = appWord.Documents.Open(Filename);
|
||||
appWord.Visible = true;
|
||||
if (printmacro == "") return;
|
||||
appWord.Run(printmacro);
|
||||
wordDocument.Close();
|
||||
wordDocument = null;
|
||||
appWord.Quit(SaveChanges: false);
|
||||
appWord = null;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user