• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

VBA macro - new message

Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
#1
Hello,

I try do macro which do new message with data from checked message.

1. A message comes to the mailbox, for example:
FROM: user@user.pl
TO: me@me.pl
SUBJECT: Title
ATTACHMENT: file.xlsx
BODY: Text

2. I click on this message, then I run a macro that will prepare me a message ready to be sent that looks like this:
FROM: me@me.pl
TO: new@new.pl
SUBCJET: Old title: Title
ATTACHMENT: file.xlsx
BODY:
Text
User: user@user.pl
Date: DD/MM/YYYY

Thanks in advance for tips and help.
 
W

Walter

#3
Hi Diane,

Can you please help run script on macro not to forward specific email address on the other emails.
Let say "A" user receives all emails from the clients (from A to Z companies). A user created forwarding rules on his outlook forwarded all the emails on the "B "user , but the B 'user he doesn't received email from client Z company. Can we set on the macro the specific email from Z company will not forwarded to B user. Please advise
Thanks, You
 
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#4
If you are using a rule, you could set an exception if sent to that address.

If you do the check in the macro, you'll need to check the recipient collection and if the address or domain is there, don't forward.
I have several samples on this page that show how to do that. The recipient code snippet can be used in the run a script macro.
Warn Before Sending Messages to the Wrong Email Address