Distribution Lists Not Bolded (via VBA)

  • Thread starter granville houldsworth
  • Start date
G

granville houldsworth

I wrote some VBA code that creates about 100 EMails and pastes the contents of worksheets into the bodies, and places distribution lists in To and BCC. The distribution lists do not populate and turn bold/underlined as they do when manually selected and inserted. In order to get them to do so, the user has to open each Email and wait -- some will populate themselves, and others have to be manually selected.

Although I have saved my user a great deal of time by creating 100 Emails in about 10 seconds, they still must spend a lot of time 'prepping' the distribution lists before sending the Emails.

On the Microsoft site, I found that this was done "by design" to save memory!

Is there any known workaround for this issue?

Thanks,


Randy
 
M

Michael Bauer [MVP - Outlook]

Randy, call the MailItem's Recipients.ResolveAll function. If the addresses
can be resolved they will be shown underlined.

--
Best regards
Michael Bauer - MVP Outlook
Use Outlook Categories? This is Your Tool:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Tue, 26 Feb 2008 20:38:44 -0600 schrieb granville houldsworth:
I wrote some VBA code that creates about 100 EMails and pastes the
contents of worksheets into the bodies, and places distribution lists in To
and BCC. The distribution lists do not populate and turn bold/underlined as
they do when manually selected and inserted. In order to get them to do so,
the user has to open each Email and wait -- some will populate themselves,
and others have to be manually selected.
Although I have saved my user a great deal of time by creating 100 Emails
in about 10 seconds, they still must spend a lot of time 'prepping' the
distribution lists before sending the Emails.
 
G

granville houldsworth

Michael - thanks, that's just what I was looking for. I have now incorporated the MailItem's Recipients.ResolveAll function.

However, my distribution lists are still not becoming bold.

Here's a code sample:

Set objEmail = objOutlook.CreateItem(0) ' olMailItem
Set myRecipients = objEmail.Recipients
With objEmail
.To = strto
.CC = strCC
.BCC = strBCC
.Subject = strSubject
.Body = strbody
.Save
End With

If Not myRecipients.ResolveAll Then
For Each myRecipient In myRecipients
myRecipient.Resolve
If Not myRecipient.Resolved Then
MsgBox myRecipient.Name
End If
Next
End If

The fake distribution list names are caught by the "If Not myRecipients.ResolveAll Then" test, but the valid distribution lists are still not being changed to bold.

Any additional information will be appreciated.


Randy
 
B

Brian Tillman

granville houldsworth said:
Michael - thanks, that's just what I was looking for. I have now
incorporated the MailItem's Recipients.ResolveAll function.

However, my distribution lists are still not becoming bold.

Here's a code sample:

If possible, please discuss programming in one of the programming groups,
like microsoft.public.outlook.program_vba or
microsoft.public.outlook.program_addins
 
G

granville houldsworth

Ok - sorry 'bout that. Didn't know it wasn't allowed. Thanks for the alternative sites.

Randy
 

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