Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 05-14-2015, 01:38 AM
garylombard garylombard is offline Outlook VBA Question Windows 7 64bit Outlook VBA Question Office 2010 32bit
Novice
Outlook VBA Question
 
Join Date: May 2015
Posts: 2
garylombard is on a distinguished road
Question Outlook VBA Question

Thank you for your reply GMayor

This is the code I am currently using in order to direct the mails coming in.

Code:
If TypeName(Item) = "MailItem" Then
    Dim strSender As String
    Dim myForward As MailItem
    
        strSender = Item.SenderEmailAddress
        If InStr(1, strSender, "xxxNamexxx", vbTextCompare) > 0 Or InStr(1, strSender, "xxx.com", vbTextCompare) > 0 Or InStr(1, strSender, "Me", vbTextCompare) > 0 Or InStr(1, strSender, "xxx.xx", vbTextCompare) > 0 Then
                If TypeName(Item) = "MailItem" Then
                                                                   
                ' Forward the item just received
                Set myForward = Item.Forward
           
                ' Address the message
                myForward.Recipients.Add "xx@example.com"
                myForward.Recipients.Add "xx@example.com"
                
                myForward.Send
            End If
        End If
    'End If

Kindly advise if you are able to assist in this matter

All help is much appreciated

Regards
Gary

Quote:
Originally Posted by gmayor View Post
Do we take it that you already have a macro that processes messages automatically? If so can you post that macro code?

If not the following line doesn't make sense as it stands.



What exactly is your process?

If you want to search for a date in the message body, the macro will need to know where to look, or it will be a laborious process to examine every bit of the message to see if it is a date, and then evaluate that date.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook VBA Question Outlook 2010 .pst question smann Outlook 1 10-04-2012 07:01 PM
Outlook chart question projecttoday Outlook 0 11-11-2011 11:29 AM
Loading Outlook sent emails question jeff8362 Outlook 2 04-23-2011 08:15 PM
Outlook express question!!!! wascapsfan Outlook 0 02-07-2011 12:35 PM
Outlook Anywhere question.... Grima Wormtonue Outlook 0 02-20-2009 09:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft