LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 152
Default GetObjects chokes on apostrophe.

I'm trying to use GetObjects in an Excel 2007 VB script to get the properties
of mailboxes. This works until I hit a mailbox LegacyDN that has an
apostrophe in it. In the example below Excel gives an "Automation error",
"-2147217375" because of the apostrophe or single quote in the name Pat
O'Conell.

winMgmts:!\\OurServer\root\MicrosoftExchangeV2:Exc hange_Mailbox.LegacyDN='/o=SW/ou=HAM/cn=CENTRAL/cn=Pat
O'Conell',MailboxGUID='{CD2...}',ServerName='OurSe rver',StorageGroupName='st
gr 02',StoreName='mb st - std'

None of the escape characters seem to work: (Pat O''Conell or Pat O\'Conell).

Any hints?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel chokes when printing multiple charts per page Steve Mills Charts and Charting in Excel 1 June 19th 09 07:43 PM
Always have apostrophe snax500 Excel Discussion (Misc queries) 5 June 22nd 07 08:26 PM
Apostrophe Ben Excel Programming 8 September 19th 05 05:26 PM
Add apostrophe Tony Wainwright Excel Worksheet Functions 4 October 29th 04 01:50 PM
Add apostrophe Tony Wainwright[_2_] Excel Programming 4 October 29th 04 01:50 PM


All times are GMT +1. The time now is 05:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"