Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
You might need to print Word document directly from X++. Here’s a short sample how to do this:
{
str document = "C:\\test.doc";
COM wordApplication;
COM wordDocuments;
COM wordDoc;
;
// Create instance of Word application
wordApplication = new COM("Word.Application");
// Get documents property
wordDocuments = wordApplication.Documents();
// Open document
wordDoc = wordDocuments.Open(document);
// Activate the document - this is necessary to print it
wordDoc.Activate();
// Print the document
wordDoc.PrintOut();
// Close document
wordDoc.Close();
// Close Word application
wordApplication.Quit();
}
Martin F