Where do you find the field names for Outlook, i.e. FirstName. Yours are practically about the only ones I can get to work. Strangely, I can’t get Business Phone (s) or faxes to work.
The answer: Use the object browser. Here’s how. First, make sure you have a reference set to the Outlook Object Library.
If you’re looking for something inside Excel or VBA, those references are set automatically, so you can skip that last step. Next, choose Object Browser from View menu (or hit F2).
From the Project/Libraries drop down, choose Outlook
This will show only the classes from that library. In the classes list, choose ContactItem. Then browse the Members list to see what’s available.
The box just below the Project/Libraries drop down is a search box. When you have an inkling of what you want, but don’t quite know the proper terms, you can use search to narrow things down.
And don’t forget that once you’ve found what you’re looking for, you can right-click on it, and select “help” because there are often little code snippets to help you out!
Chris
OutlookSpy is amazing if you really want to drill down into Outlook:
http://www.dimastr.com/outspy/
It will help to find references to properties not exposed by the object browser. I’m unaware of a similar tool for Excel.
Inevitably you’ll try to pull out something that the Outlook security doesn’t want you to have, like email addresses. For this there is Redemption:
http://www.dimastr.com/redemption/
This can be used from VBA, for example to reach into Outlook and pull out all Names and email addresses to populate spreadsheets.
HTH
(Happy customer, not a sales rep)
“It will help to find references to properties not exposed by the object browser.”
If these properties are not exposed, then how can you code against them?
Jon Peltier: “If these properties are not exposed, then how can you code against them?”
There are a number of hidden members. I can’t remember the details now, some are ancient XL97 ones suppressed, some are internal for integration only with Visual Studio.
For example, I’m not sure where worksheet.DrawingObjects belongs.
P.
You can show hidden members in the VBE object browser by right-clicking in the windows and choosing ‘Show Hidden Members’
Charles
There’s a difference between ‘Hidden’ and ‘Not Exposed’.