Hi,
I have an Access 2000 database. I use the following code to transfer a document/s via email within my Access database. It uses automation with MS Outlook.
It works successfully. Can i use the same code but modify it slightly so it can send faxes via Outlook Fax Starter. I can do it manually but now i want to automate the process within Access.
Normamly in Outlook you would go to File -> New -> Fax Message and then insert the fax number and any attachments.
Can this process be done in code. I would much appreciate if somebody can show me how.
I have tried inserting [fax@faxnumber] instead of an email address in my Access database but it does not work. It still tries to send an email.
Thanking any that can help
Jim
Set olkApp = New Outlook.Application
Set olkNameSpace = olkApp.GetNamespace("MAPI"
Set objMailItem = olkApp.CreateItem(olMailItem)
olkApp.Session.Logon
With objMailItem
email = Forms![F_Base Info - Purchaser - Word Document]![EmailAddress]
.To = email
Do While i > 0
Set objOutlookAttach = .Attachments.Add(AttachPath(i - 1))
i = i - 1
Loop
.Display
End With
olkApp.Session.Logoff
Set objMailItem = Nothing
Set olkNameSpace = Nothing
Set olkApp = Nothing
I have an Access 2000 database. I use the following code to transfer a document/s via email within my Access database. It uses automation with MS Outlook.
It works successfully. Can i use the same code but modify it slightly so it can send faxes via Outlook Fax Starter. I can do it manually but now i want to automate the process within Access.
Normamly in Outlook you would go to File -> New -> Fax Message and then insert the fax number and any attachments.
Can this process be done in code. I would much appreciate if somebody can show me how.
I have tried inserting [fax@faxnumber] instead of an email address in my Access database but it does not work. It still tries to send an email.
Thanking any that can help
Jim
Set olkApp = New Outlook.Application
Set olkNameSpace = olkApp.GetNamespace("MAPI"
Set objMailItem = olkApp.CreateItem(olMailItem)
olkApp.Session.Logon
With objMailItem
email = Forms![F_Base Info - Purchaser - Word Document]![EmailAddress]
.To = email
Do While i > 0
Set objOutlookAttach = .Attachments.Add(AttachPath(i - 1))
i = i - 1
Loop
.Display
End With
olkApp.Session.Logoff
Set objMailItem = Nothing
Set olkNameSpace = Nothing
Set olkApp = Nothing