Accessing the Microsoft Fax printer driver from C#

  • Thread starter Thread starter Mike Grace
  • Start date Start date
M

Mike Grace

Hi,

I want to send a printout as a fax.

I have installed the Microsoft fax printer driver that comes with Windows
(XP in my case), but everytime I print to it, a dialog pops up asking me for
a fax number.

Is there anyway I can embed the fax number as well as any other answers to
questions it may ask before hand so that it is always silent?


Does anyone how to do this in C#?


Regards


Mike
 
Hello Mike,

Thanks for your post. As I understand, you want to use Fax in your C#
program. I'd like to share the following information with you:

1. As you know, Fax Printer component actually installs Fax Service on your
system. I agree with Gabriele that you should access Fax Service directly
in C#. You can use COM Interop to use COM components in .NET.

Exposing COM Components to the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconexposingcomcomponentstonetframework.asp?frame=true

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Success!!!
and only in about 6 lines of code.

Thanks you very much.

One question. Does each client PC have to have the Fax printer installed or
just the machine that will do the faxing?

I only ask because I think it will only work on windows 2000 and XP clients.

I have got "copy local" on the Com object set to true.

Can I just deploy my app with the "Interop.FAXCOMEXLib.dll" file on each PC
or would it be better to set copy local to false and just make sure the fax
driver is installed?

Regards

Mike
 
If the client machine is the one that is going to send the fax, then the
client must be Windows 2000 or Windows XP (and make sure to test your code
on both). Or you could design your application to delegate the faxing
activities to a server, so you don't have to worry about the clients.
 
Back
Top