Creating a rule that both forwards the original attachment and uses a template

Status
Not open for further replies.

Andy

Member
Outlook version
Email Account
POP3
I want to create a rule that I can run on a folder containing a number of messages - all with attachments - that forwards each message to a new email address (our database dropbox account) and also write my own subject line. This is so that my database will read the subject line and then know to parse the document and extract the required information. I can only do this to an individual email at present. I run Outlook 2003 with a POP/SMTP as default (but also have Microsoft Exchange Server listed in my Email Accounts box). I hope that someone can help
 
Re: Creating a rule that both forwards the original attachment and uses a temp

Rules alone can't edit the subject line. You'll need to use a script - either standalone VBA or a Rule with the run a script action.

Try this in a run a script rule - you can either run it as messages arrive or use Run Now as needed.

Sub ChangeSubject(Item As Outlook.MailItem)
Item.Subject = "TEST"
Item.Save
Item.To = "alias@domain.com"
Item.Send

End Sub
 
Re: Creating a rule that both forwards the original attachment and uses a temp

If you want to forward it from yourself, use this code - the earlier code redirects, which may work if you have sned as permissions on the other address, but this code avoid that.




Sub ChangeSubject(Item As Outlook.MailItem)
Item.Subject = "Test"
Item.Save



Set myForward = Item.Forward


myForward.Recipients.Add "alias@domain.com"




myForward.Send




End Sub
 
Re: Creating a rule that both forwards the original attachment and uses a temp

Awesome - thanks Diane - although there were a couple of things (ps - I had to re-register under a new name as I could not find my login and the system would not send me an update). So this is Andy again.

I used the second script, but somehow - I managed to send the original as well as the new subject email - so there was a double up - any ideas?

The second is that after every email - I had a pop up ask me...

A program is trying to automatically send e-mail on your behalf.

Do you want to allow this?

If this is unexpected, it may be a virus and you should choose no.

Any ideas?
 
Re: Creating a rule that both forwards the original attachment and uses a temp

I thought i tested it on 2003, but i bet it was on 2007 and 2010 - I'll check it in the morning. I forgot about Outlook 2003's annoying security.
 
Re: Creating a rule that both forwards the original attachment and uses a temp

Thanks Diane

Do you have any idea why Outlook would be sending two versions of the email? The original with the original subject as well as the new version.

This is the actual script I used...

Sub HoppoTier1(Item As Outlook.MailItem)

Item.Subject = "/parse /tag:tier1,introapril2012"

Item.Save

Set myForward = Item.Forward

myForward.Recipients.Add "dropbox@catalystrecruitment.avature.net"

myForward.Send

End Sub


The second copy is perfect, but the first email creates confusion in the database as it tries to work out names from email addresses. The second email is perfect, but I end up with doubled up entries in my database. I actually do not mind if it sends two, as long as the "/parse /tag:tier1,introapril2012" one arrives before the original one.

andy
 
Re: Creating a rule that both forwards the original attachment and uses a temp

Do you have any other rules also forwarding? Or the original sender configured to also send to that address? That would explain the one with the normal subject and it arriving first.

to end the problem with the security stuff, either use clickYes or http://www.mapilab.com/outlook/security/ <== this addin is pretty slick - the first time you run it, you set it to allow and you won't see the dialog again.
 
Re: Creating a rule that both forwards the original attachment and uses a temp

Hi - no to either. If I run this rule on say 100 emails. my outlook sends the original for email number 1 - then the adjusted one for number 1 (with the new subject) followed by 2 emails for number 2.

Having said that - I have now installed the mapilab security thingy and the same rule now only sends the original and not the one I really want sent.

Do you have any ideas?

PS - I really appreciate your assistance :)
 
Re: Creating a rule that both forwards the original attachment and uses a temp

Does it work correctly if you using it on incoming messages instead of using run now?
 
Re: Creating a rule that both forwards the original attachment and uses a temp

Hi again. I have worked out why it was sending two copies - one from my outlook rule and one from the script - my mistake. However - with regard to the outlook security software - both types prevented my rule from actually working. The rule worked before - then stopped working after the install - then started working again after the uninstall... So it looks like I an left with the 5 second wait for each cv...
 
Re: Creating a rule that both forwards the original attachment and uses a temp

Ah.... 2 rules just as i suspected. It's odd that the rule failed with the security software, unless you configured it to block the software. My rule worked until i deleted the rule (will set it up again and double check.)
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Liza Creating a rule in outlook to filter messages Using Outlook 0
A Creating an outlook rule to forward an email with a specific message Using Outlook 1
J Outlook creating unwanted rule on its own Using Outlook 1
A Creating a rule on “Deleted items” folder Using Outlook 1
A Creating archive rule on the clients by script/ Outlook VBA and Custom Forms 3
A Creating rule to create week folder and transfer mail using alert Using Outlook 3
S Creating custom rule to move if "NAME" is in body but ignore the phrase "Hi NAME" in the search Using Outlook 2
G Creating an Outlook Rule using Internet Header time Using Outlook 1
L Creating Custom Rule to Forward emails to a BCC Using Outlook 1
G Creating Macro to scrape emails from calendar invite body Outlook VBA and Custom Forms 6
S Custom Contact card - need help creating one Outlook VBA and Custom Forms 1
D Outlook 2016 Creating an outlook Macro to select and approve Outlook VBA and Custom Forms 0
N Help creating a VBA macro with conditional formatting to change the font color of all external emails to red Outlook VBA and Custom Forms 5
G Event when creating task from mailitem Outlook VBA and Custom Forms 2
T Outlook creating unwanted tasks in Tasks and Todo from emails Using Outlook 1
Fozzie Bear Outlook 2016 Creating a shared local Contacts folder Using Outlook 2
R Creating a user defined function Outlook VBA and Custom Forms 3
M Creating an RSS Feed **FROM** Outlook 2013 Calendar. Using Outlook 5
O How to prevent CC from showing when creating a new mail? Using Outlook 1
N Creating a button or link to a form in the Organizational Forms Library Outlook VBA and Custom Forms 3
B Creating an email with the list of tasks Outlook VBA and Custom Forms 0
L Creating drafts when I thought I was sending Using Outlook 1
R Would creating a new profile cause Outlook to download all the old mails from the server? Using Outlook 1
A Creating Progress Bar or Status Bar Update Outlook VBA and Custom Forms 0
T Outlook creating a folder named: "Unwanted" Using Outlook 3
M Outlook 2007 Contacts Glitch: Creating a new email Using Outlook 1
A Are categories still recommended for creating local distribution lists? Using Outlook 3
S Creating Email - Selecting Pre-Defined Text Using Outlook 2
D Creating an outlook session from Access vba but run silently. With A specific profile Outlook VBA and Custom Forms 1
M Creating Outlook Appointments from Excel Cells Outlook VBA and Custom Forms 1
N Creating New Profile Using Outlook 0
Y Creating custom appointment request form with multiple mail recipients Outlook VBA and Custom Forms 5
M creating email from contact file = 3 emails in To field Using Outlook 3
P Recover / Extract Rules from standalone PST file creating RWZ file Using Outlook 2
I Creating meeting invite with disabled tentative button Outlook VBA and Custom Forms 5
E Creating email templates for organizational use Using Outlook 0
N Creating or changing the main new mail message template in Outlook 2010 Using Outlook 2
D Creating custom view with VBA Outlook VBA and Custom Forms 2
R Creating a Room Mailbox with Exchange Online Outlook VBA and Custom Forms 0
CMG73 Creating templates with predefined subject and CC Using Outlook 1
G Creating Contact Sub Folders Using Outlook 2
Rupert Dragwater creating gmail account in Outlook 2013 Using Outlook 7
nathandavies Creating a Select Case for a directory of folders Outlook VBA and Custom Forms 1
2 creating custom stationery Using Outlook 2
A Help creating macro for conditional formatting settings Using Outlook 8
Fozzie Bear Creating Custom Meeting Form Outlook VBA and Custom Forms 6
U Creating a (This computer only) folder within an IMAP account directory Using Outlook 1
J Creating a URL from a message body excerpt before forwarding Using Outlook 2
B Need Help Creating Email Based on Subject w Address in Body Outlook VBA and Custom Forms 1
J Creating an "isolated" shared calendar in Outlook Outlook VBA and Custom Forms 1

Similar threads

Back
Top