Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:

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?
0
hishopper
Asked:
hishopper
  • 2
  • 2
1 Solution
 
sunray_2003Commented:
check this PAQ

http:Q_20190056.htm
0
 
hishopperAuthor Commented:
The page cannot be found
0
 
sunray_2003Commented:
Sorry i missed the html

http:Q_20190056.html
0
 
hishopperAuthor Commented:
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
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now