N
Niloday
Hi All,
I have COM dll developed in VB.6 that exposes a method to print a word
document. The method accepts the name of the printer and the fully
qualified name of the document to be printed. In the DLL, it loops through
the printers collection to check if the printer name is valid and sets the
requested printer as default printer. Secondly it uses late binding for
Word Application and prints the document on the default printer.
This DLL works properly when used from a VB application. Now I wanted to
use the same DLL from my C# class library (this is used by the windows
service application) to have the documents printed.
When I attempt to use this from C#, firstly it fails to loop through the
Printers collection. (Printers collection is not nothing) and Second issue
is that, it opens the document when called as
wordObject.documents.Open fileName
but fails to print when called as
wordObject.PrintOut
with an error as "File path access error"
Could anyone please provide me some pointers on what this could be the
issue.
Thanks in advance
Niloday
I have COM dll developed in VB.6 that exposes a method to print a word
document. The method accepts the name of the printer and the fully
qualified name of the document to be printed. In the DLL, it loops through
the printers collection to check if the printer name is valid and sets the
requested printer as default printer. Secondly it uses late binding for
Word Application and prints the document on the default printer.
This DLL works properly when used from a VB application. Now I wanted to
use the same DLL from my C# class library (this is used by the windows
service application) to have the documents printed.
When I attempt to use this from C#, firstly it fails to loop through the
Printers collection. (Printers collection is not nothing) and Second issue
is that, it opens the document when called as
wordObject.documents.Open fileName
but fails to print when called as
wordObject.PrintOut
with an error as "File path access error"
Could anyone please provide me some pointers on what this could be the
issue.
Thanks in advance
Niloday