Sample code to send email from Outlook, can include signature, attached file, embedded image, cc, bcc, setting the replyto email address
I regularly need to send emails via outlook and have done a lot of work over the last few months to improve the routine that i use.
I thought i would post it...
i have a routine (sending outlook with loads of arguements, quite a few of which are boolean, so when you try and read the code you just see
sendmessage .......false, true, false, true etc
(I only used the filename example as it was much shorter and less confusing)
CyberLynx, cheers, you gave...
looking around the site i found this thread within this forum.
looks like using mapi can avoid all of the grief with outlook object model.
http://www.access-programmers.co.uk/forums/showthread.php?t=131584
take a look at this, it should explain what happened as a result of MS updating the security model in Outlook
http://www.outlookcode.com/article.aspx?ID=52
if you are running in an Active Directory environment then you can do this group policy
http://support.microsoft.com/kb/885682
include argument name in function call, eg ?longpathname(strfile:= "c:\file~1.txt")
i am not sure if i am making this up or not, but i thought it was possible to include the arguement name in a function call (to improve the readability of the code).
if a function longpathname takes 1 arguement...