Outlook macro to automate search and forward process

Status
Not open for further replies.

mkunk1

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
is this possible?
Is there a way to use a macro that will search an inbox for a part of a subject line from an email then forward the search results to another email?
Example: Macro is triggered, for each COMPLETE email in the inbox, subject line of the email is “This is the subject COMPLETE”, I want outlook to search my inbox for ”subject”, any emails with “subject” in the subject line get forwarded to a different email then move on to the next email with COMPLETE in it and repeat.

To clarify, the macro should always search the item (combination of letters and numbers, always 15 characters long) to the left of COMPLETE.
Also, it would not need to be triggered once the COMPLETE email comes into the inbox (ok to be triggered manually) but would need to treat each complete email as a separate “job” to repeat the search and forward for each email with complete in the subject.
Thanks!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Yeah, it would be possible. If there are not many messages in the folder, you can just loop through the folder, but if there are a lot, you'll want to use a filter 9Find or Restrict function) then loop the results to send.

I'll see if i can find some code that comes close to what you want.
 

mkunk1

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Yeah, it would be possible. If there are not many messages in the folder, you can just loop through the folder, but if there are a lot, you'll want to use a filter 9Find or Restrict function) then loop the results to send.

I'll see if i can find some code that comes close to what you want.
Thank you Diane. I have tried googling and searching for a similar code, is there anywhere in particular you would recommend looking?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
i have this macro which is close - then we just need to loop the results and send. I'm pretty sure i have something to loop - sending is easy.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
this example uses a slower method- checking for the value then doing whatever - it would be slow if you had much mail.
 

mkunk1

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
i have this macro which is close - then we just need to loop the results and send. I'm pretty sure i have something to loop - sending is easy.
Would this find the related messages by subject? The only issue is sometimes a new email is sent for the same topic instead of a reply and as such the subject line may not be identical across all the emails.
 

mkunk1

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Would this find the related messages by a keyword(s) in the subject? The only issue is sometimes a new email is sent for the same topic instead of a reply and as such the subject line may not be identical across all the emails.
Edited. "keyword(s) in the subject"
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
witzker Macro to move @domain.xx of a Spammail to Blacklist in Outlook 2019 Outlook VBA and Custom Forms 7
S Macro for other actions - Outlook 2007 Outlook VBA and Custom Forms 23
S Macro to move “Re:” & “FWD:” email recieved the shared inbox to a subfolder in outlook Outlook VBA and Custom Forms 0
S Outlook Macro to send auto acknowledge mail only to new mails received to a specific shared inbox Outlook VBA and Custom Forms 0
S Outlook Macro to move reply mail based on the key word in the subjectline Outlook VBA and Custom Forms 0
R Macro Schedule every day in Outlook Using Outlook 0
L Moving emails with similar subject and find the timings between the emails using outlook VBA macro Outlook VBA and Custom Forms 1
N How can I increase/faster outlook VBA Macro Speed ? Using Outlook 2
A Outlook macro to create search folder with mail categories as criteria Outlook VBA and Custom Forms 3
V Outlook Macro to show Flagged messages Outlook VBA and Custom Forms 2
J Help Please!!! Outlook 2016 - VBA Macro for replying with attachment in meeting invite Outlook VBA and Custom Forms 9
S Macro using .SendUsingAccount only works the first time, after starting Outlook Outlook VBA and Custom Forms 4
M Slow VBA macro in Outlook Outlook VBA and Custom Forms 5
A Forward Outlook Email by Filtering using Macro Rule Outlook VBA and Custom Forms 44
Tanja Östrand Outlook 2016 - Create Macro button to add text in Subject Outlook VBA and Custom Forms 1
D Outlook macro with today's date in subject and paste clipboard in body Outlook VBA and Custom Forms 1
C Outlook Subject Line Macro Outlook VBA and Custom Forms 0
D Macro sending outlook template from Excel list Outlook VBA and Custom Forms 6
P Macro to attach a file in a shared Outlook draft folder Outlook VBA and Custom Forms 2
R Macro to check file name with outlook address book Outlook VBA and Custom Forms 0
Diane Poremsky Use a macro to copy data in Outlook email to Excel workbook New Slipstick.com Articles 0
W macro to export outlook emails to excel Outlook VBA and Custom Forms 6
J Outlook Macro to Update Sharepoint Excel File Using Outlook 1
Patrick van Berkel Best way to share (and keep up-to-date) Macro's in Outlook 2010 Outlook VBA and Custom Forms 6
C Newbie needs help with Outlook Macro Outlook VBA and Custom Forms 3
L Outlook 2007 - Macro Re Search Using Outlook 16
L Outlook 2007 Macro to Contact From a Field Using Outlook 3
A newb outlook macro help Outlook VBA and Custom Forms 1
Diane Poremsky Macro to Bulk Import Contacts and vCards into Outlook New Slipstick.com Articles 0
S Outlook 7 VBA macro for multiple filing Outlook VBA and Custom Forms 1
S Macro in an excel for outlook. Outlook VBA and Custom Forms 2
A Outlook Macro Causing Excel Error Outlook VBA and Custom Forms 0
Diane Poremsky Use a macro to copy data in Outlook email to Excel workbook New Slipstick.com Articles 0
S Outlook Macro Reply to a message Outlook VBA and Custom Forms 1
Diane Poremsky Macro to Bulk Import vCards into Outlook New Slipstick.com Articles 0
M Outlook VBA Macro that could retrieve/display the (From, Subject, Date Received) Outlook VBA and Custom Forms 2
Philip Rose Recreating a WORD Editing Macro to use in Outlook VBA Outlook VBA and Custom Forms 4
A Macro to Copy Data from Outlook to Excel Spreadsheet Using Outlook 2
P Outlook Macro sends information to Excel Using Outlook 1
P Outlook Macro keeps running for the same messagage Using Outlook 2
B Looking for Outlook 2013 update for Send Drafts Macro Using Outlook 4
J VBS Script (macro) for word to open Outlook template. Outlook VBA and Custom Forms 2
S Macro for Reply All in 2013 Outlook Outlook VBA and Custom Forms 10
L Outlook 2007 Macro Save Contact Using Outlook 10
Aussie Looking for Outlook macro to Copy Recipient Names into Email Body Outlook VBA and Custom Forms 3
H Outlook Macro Using Outlook 1
L Outlook 2007 Macro Reply to E-mail Using Outlook 16
L Outlook 2007 Macro Search Contacts Using Outlook 9
L Outlook 2007 Macro to LinkedIn Using Outlook 3
L Outlook 2007 Macro Open Contact Folder Using Outlook 7

Similar threads

Top