Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sample code to send fax via Microsoft Fax

Status
Not open for further replies.

wmorris

Programmer
May 24, 2002
5
US
Does anyone have any Vfoxpro 6 or 7 sample code for sending a fax to the Microsoft Fax service that comes with Windows 2000? I need to fax out via the built in fax on the W2000 terminal server. Winfax and many others don't support faxing from a terminal server. I have the Winfax code and it works great from non terminal server PC's. I have this Outlook sample code that works great to send out via Outlook, but I would like to skip having to configure outlook for each user on the terminal server and just dump the fax directly into the MS fax system. I know I can print to the fax, but in this app there is alot of automated faxing and we need to pass the user name and fax number to the fax service.
This is the sample code that I use for Outlook that was in the Faqs area. This works great, I was looking for something similar that connects to the MS fax system.
Thanks for any help!

bfax='[fax:'+alltrim(afax1)+']'

#DEFINE olMailItem 0
myOLApp = createobject("Outlook.Application")
myOLItem = myOLApp.CreateItem(olMailItem)
WITH myOLItem
.To = bfax
.Subject = 'test'
.Attachments.Add((SYS_TDRIVE)+"\report.pdf")
ENDWITH
* .Body = "This is a sample fax."

WAIT WINDOW "Sending fax, Please wait...." nowait

myOLItem.Send
WAIT Clear

=MESSAGEBOX('Fax was sent via Outlook',0+64,'Fax Information',3000)



 
HI,

You may still have to use Outlook with your code. All that is required to accomplish this task is to include a Fax Mail Transport in your Outlook profile. For Outlook 2002, go to Tools|E-mail Accounts|Add a new e-mail account|Additional Server Types|Fax Mail Transport. For Outlook 2000, go to Tools|Services and add the Fax Mail Transport there.

Peping
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top