UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Mymail.attachments.add Ignoring "displayname"    
 
   
AccessRube
post May 21 2012, 01:50 PM
Post #1

UtterAccess Member
Posts: 36



Hello all,

I've got a module for sending emails that works fine, with one exception; I'm attaching a few files with MyMail.Attachments.Add, which is attaching the files fine, except it's ignoring the value I pass it in "Displayname", and simply using the entire file name, so, MyMail.Attachments.Add "C:\Users\Jamie_Witte\Desktop\DSFB_EmployeeRegistrationLetter_5.2.12.docx", olByValue, 1, "Registration Instructions" is attaching a file called "DSFB_EmployeeRegistrationLetter_5.2.12.docx", instead of "Registration Instructions". After doing some googling it seems like this was in issue with earlier versions, but I couldn't find a fix for this with 2010. Any thoughts, suggestions? What am I missing?



Thanks
Go to the top of the page
 
+
theDBguy
post May 21 2012, 02:29 PM
Post #2

Access Wiki and Forums Moderator
Posts: 47,940
From: SoCal, USA



Hi,

(IMG:style_emoticons/default/welcome2UA.gif)

Can you confirm that the mail item object you created is in Rich Text Format? Thanks.

Just my 2 cents... (IMG:style_emoticons/default/2cents.gif)
Go to the top of the page
 
+
AccessRube
post May 21 2012, 02:39 PM
Post #3

UtterAccess Member
Posts: 36



Apologies, how would I check this? I can post the entire module if that would help...

I think it's plain text, I wasn't aware I could do Rich Text.
Go to the top of the page
 
+
theDBguy
post May 21 2012, 02:54 PM
Post #4

Access Wiki and Forums Moderator
Posts: 47,940
From: SoCal, USA



Hi,

QUOTE (AccessRube @ May 21 2012, 12:39 PM) *
I think it's plain text, I wasn't aware I could do Rich Text.

If you're using something like this in your code, then it's plain text:

MyMail.Body = "Email Body Message Text Here..."

If so, then the Display Name will not work because it only works with RTF. Try going to your Outlook Email Options and select the Default Email Format to be Rich Text, then in your code, you can use something like:

MyMail.RTFBody = "Your message here..."

Just my 2 cents... (IMG:style_emoticons/default/2cents.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 21st May 2013 - 04:12 AM