Sending a fax with Outlook
If you look in the code you will notice the line
MyMail.To = "[FAX: " & gOutsideLine & Number & " ]"
It is the prefix "[FAX:
that tells Outlook that this 'E-mail' is actually a fax and that it should contact Microsoft Fax to pass on the message.
Outlook makes no distinction between an E-mail and a Fax they are both the same thing.
The code to send an E-mail would be almost identical except the line 'MyMail.To' would specify an e-mail address.
A few more things I should mention:
(1) You will need to create all of your Word Documents first before you 'attach' them.
If you have multiple word documents to send to different fax machines you should create them all first before using the fax routine.
(2) You can attach just about any form of Office based document by specifying the path of the document when calling the function eg. Word Documents or Excel spreadsheet.
(3) You may need to specify the variable gOutsideLine if you want to specify a outside line prefix.
(4) You should test sending an Outlook Fax before trying to do it automatically using VB.
Create a new E-mail and enter the following in the To box:
[FAX: {yournumberhere} ]
Enter the rest of your information as if you are sending an E-mail
Attach any word documents and click send.
If Microsoft Fax is correctly installed then this should work. Get manual fax working before you try using the code!
Let me know how you get on?