A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Search for contact item with double quotes in Name



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 8th 06, 09:45 PM posted to microsoft.public.outlook.program_addins
Dave
external usenet poster
 
Posts: 15
Default Search for contact item with double quotes in Name

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)





Ads
  #2  
Old May 9th 06, 11:25 PM posted to microsoft.public.outlook.program_addins
Dave Kane [MVP - Outlook]
external usenet poster
 
Posts: 33
Default Search for contact item with double quotes in Name

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" wrote in message
...
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)







  #3  
Old May 11th 06, 09:01 PM posted to microsoft.public.outlook.program_addins
Dave
external usenet poster
 
Posts: 15
Default Search for contact item with double quotes in Name

Thanks, this does work


"Dave Kane [MVP - Outlook]" wrote in message
...
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" wrote in message
...
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)









 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Contact Search KT Outlook - Using Contacts 3 April 21st 06 10:40 PM
Cannot search contact by first name without using accent Minnie Outlook - Using Contacts 0 March 14th 06 03:54 PM
How can I include quotes around a word in text string? Maureen Outlook and VBA 3 March 3rd 06 12:10 PM
Microsoft Outlook closes when I try and open (double-click) a Contact [email protected] Outlook - General Queries 0 February 28th 06 08:37 PM
Why can't I find a contact through search? lostquilt Outlook - Using Contacts 4 January 31st 06 11:53 PM


All times are GMT +1. The time now is 09:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.