Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Search for contact item with double quotes in Name

Geek News

Search for contact item with double quotes in Name
"Dave" <KingOfTheBeach[ at ]community.nospam> 5/8/2006 7:45:07 PM
Is there any way to search for an Outlook contact item that has double
quotes in there Name/FileAs field ?

The FileAs field has like - Smith, David "Home"

Dim fldrs As Outlook.MAPIFolder
Dim SearchItem As Outlook.ContactItem

' this assignment doesn't work in VB as written, but I'm just trying to
represent the string
' I'm searching for
strSearch = "[FileAs] = "Smith, David "Home""

Set SearchItem = g_fldr.Items.Find(strSearch)





Re: Search for contact item with double quotes in Name
"Dave Kane [MVP - Outlook]" <dkane[ at ]mvps.org> 5/9/2006 9:25:01 PM
Create your search string like this, specifying the ASCII character for the
double-quote and using a single-quote to delimit the value of the field you
are searching on.

strSearch = "[FileAs]='Smith, David " & Chr(34) & "Home" & Chr(34) & "'"
"Dave" <KingOfTheBeach[ at ]community.nospam> wrote in message
news:ego1dftcGHA.4892[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> Is there any way to search for an Outlook contact item that has double
> quotes in there Name/FileAs field ?
>
> The FileAs field has like - Smith, David "Home"
>
> Dim fldrs As Outlook.MAPIFolder
> Dim SearchItem As Outlook.ContactItem
>
> ' this assignment doesn't work in VB as written, but I'm just trying to
> represent the string
> ' I'm searching for
> strSearch = "[FileAs] = "Smith, David "Home""
>
> Set SearchItem = g_fldr.Items.Find(strSearch)
>
>
>
>
>


Re: Search for contact item with double quotes in Name
"Dave" <KingOfTheBeach[ at ]community.nospam> 5/11/2006 7:01:40 PM
Thanks, this does work


"Dave Kane [MVP - Outlook]" <dkane[ at ]mvps.org> wrote in message
news:OIPvd66cGHA.5116[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> Create your search string like this, specifying the ASCII character for
the
> double-quote and using a single-quote to delimit the value of the field
you
> are searching on.
>
> strSearch = "[FileAs]='Smith, David " & Chr(34) & "Home" & Chr(34) & "'"
> "Dave" <KingOfTheBeach[ at ]community.nospam> wrote in message
> news:ego1dftcGHA.4892[ at ]TK2MSFTNGP02.phx.gbl...
> > Is there any way to search for an Outlook contact item that has double
> > quotes in there Name/FileAs field ?
> >
> > The FileAs field has like - Smith, David "Home"
> >
> > Dim fldrs As Outlook.MAPIFolder
> > Dim SearchItem As Outlook.ContactItem
> >
> > ' this assignment doesn't work in VB as written, but I'm just trying
to
> > represent the string
> > ' I'm searching for
> > strSearch = "[FileAs] = "Smith, David "Home""
> >
> > Set SearchItem = g_fldr.Items.Find(strSearch)
> >
> >
> >
> >
> >
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net