View Single Post
  #5  
Old April 23rd 08, 05:41 AM posted to microsoft.public.outlook.program_addins
PGS123
external usenet poster
 
Posts: 5
Default Handling of Double or Single Quotation Marks in ConversationTo

No luck. I think the problem here is the property of ConversationTopic is
readonly. Even if it is a read/write property it will be a hassle to replace
each and everyone of the same ConversationTopic due to performance issues.
Another issue is that the Restrict method will hunt for all identical
ConversationTopic in Outlook folders and thus changing a particular instance
of the ConversationTopic will not help.

Robin


"Ken Slovak - [MVP - Outlook]" wrote:

Hmmm. Have you tried doubling up any single quotes to escape them when
they're in the EmailSubject string? Then you could try just using single
quotes surrounding the EmailSubject part of the restriction.

string test = EmailSubject;

// first clause has single quote within double quotes,
// second clause has 2 single quotes within double quotes.
EmailSubject = test.Replace("'", "''");

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"PGS123" wrote in message
...
Hi Ken,

I did. What I did was to detect the presence of single quote in
ConversationTopic then I will use double quotes in my Restrict criteria.
And
if I detected the presence of double quote in ConversationTopic then I
will
use single quotes in my Restrict criteria. This works out well. But the
problem is when both the single and double quotes are present in
ConversationTopic then I don't know how to write my Restrict criteria.

Regards,
Robin



Ads