Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Blacktown, Sydney, New South Wales, Australia
    Posts
    175
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Rules Wizard (Outlook XP)

    I am the editor of an electronic newsletter.

    I wish to set up the recipients in the Outlook Contacts folder. The recipients will subscribe by sending me an e-mail with the word 'Newsletter' or 'Unsubscribe' in the Subject line.

    I also wish to :-
    1 Add recipient to 'Contacts'
    2 Assign Category 'Newsletter' or (in the case of Unsubscribe, delete 'Newsletter' Category), to the Contact's details.
    3 Move message to another folder.
    4 Send a reply, acknowledging receipt.


    I am able to complete No 3 and 4 quite easily, using the Rules Wizard, and after creating a 'Receipt Template'.

    Items No 1 and 2 however have me beat. I have used VBA in Excel and Access, but not in Outlook.


    Any ideas?

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Cairns, Queensland, Australia
    Posts
    885
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rules Wizard (Outlook XP)

    Hi Dev,

    Have you checked the posts about issues with rules in XP. There have been a few. My experience with rules in XP has been far from happy, as you can read in the other threads.
    Granville

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Rules Wizard (Outlook XP)

    The addition of new contacts and category won't be difficult. The code at <post#=334450>post 334450</post#> has similarities to what you want.

    But, thinking out loud, it may not be easy coding to find an existing Contact from an e-mail originator address. If any one wants to throw some ideas at me that would be good. One part of Outlook's model that I haven't explored is the Find Method, which is probably the best way to go about the search for an existing e-mail address. (What the heck does "Email1EntryID" actually return?)
    -John ... I float in liquid gardens
    UTC -7ąDS

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Find Syntax

    <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23> What's wrong with this <img src=/w3timages/censored.gif alt=censored border=0> syntax? (Test code re this thread.)

    Sub FindContactFromEAddress()
    Dim olNS As Outlook.NameSpace
    Dim fldrContacts As MAPIFolder
    Dim itmContact As ContactItem, itmNewContact As ContactItem
    Dim strSearchFor As String
    Set olNS = Application.GetNamespace("MAPI")
    Set fldrContacts = olNS.GetDefaultFolder(olFolderContacts)
    strSearchFor = InputBox("Enter Email Address to Search for: ", _
    "Search Contacts for EMail Address")
    strSearchFor = """[Email1Address] = """"" & strSearchFor & """"""""
    <font color=red>next line returns error "not a valid condition"</font color=red>
    Set itmContact = fldrContacts.Items.find(strSearchFor)
    If Not itmContact Is Nothing Then
    itmContact.Display
    Else
    MsgBox "Not found"
    End If
    Set itmContact = Nothing
    Set fldrContacts = Nothing
    Set olNS = Nothing
    End Sub
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Blacktown, Sydney, New South Wales, Australia
    Posts
    175
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Find Syntax

    Thanks John,

    You have given me a path to tread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •