Results 1 to 1 of 1
2003-11-11, 22:39 #1
- Join Date
- Feb 2003
- Pacific Grove, California, USA
- Thanked 33 Times in 27 Posts
GetAddress Method Revisited (Word XP / SP2)
In re: <post#=310857>post 310857</post#>, I outlined an attack at getting multiple names and addressed out of Outlook and into a Word letter.
I have hit a snag. I am displaying the GetAddress dialog with the option to identify any/all recipients at once (To, cc and bcc) and put them into a form.
And, as reported in that posting, the GetAddress method only returns 255 characters. Letters are sometimes addressed to more than one recipient in the same letter like this:
123 Main Street
Anytown, CA 90009
321 Main Street
Anytown, CA 90009
This limitation is, well, limiting -- as business addresses can be quite long.
So, I proceeded to write code to return only the display names (which saves me a lot of coding on the cc and bcc names), then pass the To names back to the GetAddress method to accumulate the complete addresses of any/all To: recipients.
This works, except... GetAddress doesn't know that "John Smith" with an SMTP email address is the same as "John Smith" with a fax number -- even though he is. So. If one disables the query, but then I get an "ambiguous name" type error and it won't return anything (which makes one wonder why the option to disable the query exists).
GetAddress is really accessing the Address Book, but does anyone know a way around this? It looks gooney to ask the user to identify the correct John Smith from a list of three John Smiths who are all the same John Smith -- when they just previously picked John Smith from the Select Names dialog generated by the GetAddress method. Man! Maybe at this point, accessing Outlook objects directly might be the best solution?
Am I explaining this well enough? Any thoughts? I am, at this point <img src=/S/bwaaah.gif border=0 alt=bwaaah width=123 height=15> (frustrated...)