GetObjects chokes on apostrophe.

R

Ross

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:Exchange_Mailbox.LegacyDN='/o=SW/ou=HAM/cn=CENTRAL/cn=Pat
O'Conell',MailboxGUID='{CD2...}',ServerName='OurServer',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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top