Outlook Original Sender to CC Email -


i have outlook vba code forwards original email predetermined people, appends email subject , adds text email body.

i need pull original sender of email (using senderemailaddress mailitem sure) , place email address in cc of email being forwarded.

sub cadreemailfwd()  set objol = createobject("outlook.application") set objmsg = objol.activeinspector.currentitem  set objforward = objmsg.forward  set myitem = application.activeinspector.currentitem  objforward.recipients.add "dlud@blahblah.com" objforward.recipients.add "mcha@blahblah.com" objorignialbody = objforward.body objoriginalsubject = objforward.subject  objforward.subject = "[cadre request #  ] " & objoriginalsubject objforward.display objforward.body = "[cadre request #   ]" & bodyofemail & objorignialbody  end sub 

try

objforward.recipients.add(myitem.senderemailaddress).type = olcc 

or

objforward.recipients.add(myitem.sender).type = olcc 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -