I'm having trouble with a Visual Basic/FileMaker integration I set up to create emails with attachments using Outlook for Windows. The problem is that the PDF attachments are not recognized by Outlook, instead the files are attaching as bitmaps (see image)
For another client, this same implementation has worked perfectly for years. Any theories for what might be causing the malfunction?
Here's the code:
Dim OutApp Dim OutMail Dim strbody Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) strbody = "This is a test.<br><br>Sincerely," On Error Resume Next With OutMail .Display .To = "firstname.lastname@example.org" .CC = "" .BCC = "" .Subject = "This is a test" .HTMLBody = strbody & "<br>" & .HTMLBody .Attachments.Add("C:\Users\test\Desktop\test.pdf") .Display End With On Error GoTo 0 Set strbody = Nothing Set OutMail = Nothing Set OutApp = Nothing
Thanks for any hints you can provide!