hishopper
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?
ASKER
The page cannot be found
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.appl ication")
'Initialize MAPI session
Set olnamespace = Outapp.GetNamespace("MAPI" )
Set mycontacts = olnamespace.GetDefaultFold er(olFolde rContacts) 'Open the Folder of contacts
'You can use the method Find or Restric to search
Set myitem = mycontacts.Items.Find("[Na me] = ""*Jira*"" ")
End Sub
I get: Compile Error: User-Defined type not defined
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.appl
'Initialize MAPI session
Set olnamespace = Outapp.GetNamespace("MAPI"
Set mycontacts = olnamespace.GetDefaultFold
'You can use the method Find or Restric to search
Set myitem = mycontacts.Items.Find("[Na
End Sub
I get: Compile Error: User-Defined type not defined
http:Q_20190056.htm