B
bil4913
Have an application that allow users to send email within access via outlook,
including ability for attachments. It's worked for years, but 2 weeks ago,
instead of including attachments, outlook is just attaching a link to the
file, which is useless, since it's on the sender's hard drive. My code didn't
change, the users' server had no upgrade.
Here's a snippet of code i use:
Set objOutlook = CreateObject("Outlook.Application")
Set objEmailMessage = objOutlook.CreateItem(olMailItem)
objEmailMessage.Subject = Subject ' (from form)
If Not IsNull(Recipient1) Then objEmailMessage.Recipients.Add [Recipient1]
objEmailMessage.Body = EmailBody ' (from form)
Dim attachmentfile
Dim documentName
If Attachments = "opportunity report" Then
attachmentfile = "C:\pdf995\output\opportunities.pdf"
documentName = attachmentfile
objEmailMessage.Attachments.Add documentName, olByValue, 1
objEmailMessage.Recipients.ResolveAll
objEmailMessage.Display
objEmailMessage.send
It used to work fine, but now, just a link to the file is sent.
Any ideas?
including ability for attachments. It's worked for years, but 2 weeks ago,
instead of including attachments, outlook is just attaching a link to the
file, which is useless, since it's on the sender's hard drive. My code didn't
change, the users' server had no upgrade.
Here's a snippet of code i use:
Set objOutlook = CreateObject("Outlook.Application")
Set objEmailMessage = objOutlook.CreateItem(olMailItem)
objEmailMessage.Subject = Subject ' (from form)
If Not IsNull(Recipient1) Then objEmailMessage.Recipients.Add [Recipient1]
objEmailMessage.Body = EmailBody ' (from form)
Dim attachmentfile
Dim documentName
If Attachments = "opportunity report" Then
attachmentfile = "C:\pdf995\output\opportunities.pdf"
documentName = attachmentfile
objEmailMessage.Attachments.Add documentName, olByValue, 1
objEmailMessage.Recipients.ResolveAll
objEmailMessage.Display
objEmailMessage.send
It used to work fine, but now, just a link to the file is sent.
Any ideas?