If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Faxing using Outlook XP and Visual FoxPro 7
Hi All, I'm working with a MS-Access based Fax automation application that is experiencing the same issue that was described by David. Everything was working fine with Outlook 2000, but will not work with Outlook 2003. There hasn't been any responses to my general post (http://www.mcse.ms/showthread.php?s=&threadid=648390) regarding known issues with Outlook 2003 in this respect so I'm hoping that someone familiar with this thread has some additional information. I can programmatically send faxes by using the Outlook objects to provide the automation; however unlike David I need to maintain a generic level of MAPI compatibility. I've posted the code that I am working with. I have tried using a Reciepient object (instead of .Recipients.add) as well as using either/both the .Name and .Address properties in conjunction with the .Resolve method to send the fax number. Sending the fax number as the .Name property seems to get the best results as it is possible to open and properly resend the returned message. Other info: Windows XP Access 2000 Outlook 2003 Windows XP Fax Thanks in advance, MCasebier Call SendMail("[FAX:555-5555]", "automated email", "the message text", True) Public Function SendMail(Email_To As String, Optional Subject As String = "", Optional MessageText As String = "", Optional ShowDialogYn = False) As Long 'Returns 0 = Success/Non-Zero = Error On Error GoTo SendMail_Err Dim RetVal As Long Dim objOutBox As Object 'MAPIFolder Dim objNewMessage As Object 'MailItem 'default the return value RetVal = 0 'objSession is established elsewhere via the following statements ' Set objSession = CreateObject("MAPI.Session") ' objSession.LogOn showdialog:=False, NewSession:=False 'verify that a MAPI session is available If objSession Is Nothing Then RetVal = -1 MsgBox "Must LogOn before using the SendMail method.", vbCritical Else 'use a reference to the outbox to create a new message object Set objOutBox = objSession.outbox Set objNewMessage = objOutBox.messages.Add 'add the recepient e-mail address objNewMessage.Recipients.Add Name:=Email_To, Type:=1 'set the subject and text objNewMessage.Subject = Subject objNewMessage.Text = MessageText 'send the email objNewMessage.Send showdialog:=ShowDialogYn End If SendMail_Exit: SendMail = RetVal Exit Function SendMail_Err: RetVal = Err.Number Resume SendMail_Exit End Function -- MCasebier ------------------------------------------------------------------------ Posted via http://www.mcse.ms ------------------------------------------------------------------------ View this thread: http://www.mcse.ms/message400149.html |
#2
|
|||
|
|||
Faxing using Outlook XP and Visual FoxPro 7
Wouldn't you know that after weeks of research and a lot of trial and error, it's not until I take the time to write up a lengthy post that I find a resolution to the issue. It was written up for Outlook 2002, but the fix works for 2003 as well. OL2002: You Receive an NDR When You Use a Simple MAPI Program to Send a Message http://tinyurl.com/2fp8y Thanks, MCasebier -- MCasebier ------------------------------------------------------------------------ Posted via http://www.mcse.ms ------------------------------------------------------------------------ View this thread: http://www.mcse.ms/message400149.html |
Thread Tools | |
Display Modes | |
|
|