Link to home
Start Free TrialLog in
Avatar of hishopper
hishopperFlag for United States of America

asked on

command line switch to search for contact

Are there unlisted switches or a simple vb thing that would open outlook and search for a (passed-parameter) contact?
Avatar of sunray_2003
sunray_2003
Flag of United States of America image

check this PAQ

http:Q_20190056.htm
Avatar of hishopper

ASKER

The page cannot be found
ASKER CERTIFIED SOLUTION
Avatar of sunray_2003
sunray_2003
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
K.. you get the points, but as a freebie could anyone help me do this with Access' form of VB?  (I don't know VB at all).
I tried the following:

    Private Sub Command27_Click()
**Dim Outapp As Outlook.Application
    Dim olnamespace As Outlook.NameSpace
    Dim mycontacts  As MAPIFolder
    Dim myitem As Outlook.ContactItem

    'Open OutLook
    Set Outapp = CreateObject("OutLook.application")
    'Initialize MAPI session
    Set olnamespace = Outapp.GetNamespace("MAPI")

    Set mycontacts = olnamespace.GetDefaultFolder(olFolderContacts) 'Open the Folder of contacts

    'You can use the method Find  or Restric to search
    Set myitem = mycontacts.Items.Find("[Name] =  ""*Jira*"" ")

    End Sub

I get: Compile Error: User-Defined type not defined