[AccessD] Bold In an Email

Rocky Smolin rockysmolin2 at gmail.com
Wed Mar 2 14:40:37 CST 2022


Gustav:

Not sure how to go about that. Maybe you can point me in the right direction

Email creating coded starts with

Dim myolApp As Object
Dim myItem As Object

(should start with
Dim myolApp As Outlook.Application
Dim myItem As Outlook.MailItem
or does it make any difference?)

There are twelve different formats of email but they all start with

    Set myolApp = CreateObject("Outlook.Application")
    Set myItem = myolApp.CreateItem(0)
    myItem.Display

Then sets the .To, .CC, and .Subject

    myItem.To = Nz(DLookup("fldDLEmail", "tblDiscussionLeader",
"fldDiscussionLeaderID = " & Val(Me.fldDiscussionLeaderID)), "") & ":"
    myItem.CC = Nz(DLookup("fldUserEmail", "tblUser", "fldUserID = " &
Val(Me.fldAdministratorID)), "")
    myItem.Subject = "New Course Confirmation " & Me.fldCourseNumber

Then a bunch of lines all starting with myItem.body = myItem.body &

One of the lines which needs formatting is:

myItem.body = myItem.HTMLBody & "*** This is a blended course, so please
send out the prework and testing instructions. We will be doing the
certificates on this."

As I say, it all formats real nice. But now this request for formatting on
this line.

TI(A

Rocky


On Wed, Mar 2, 2022 at 9:51 AM Gustav Brock via AccessD <
accessd at databaseadvisors.com> wrote:

> Hi Rocky
>
> Then you have to create full e-mail body as HTML formatted text.
> Outlook will include a plain text copy which will be seen if the receiving
> client doesn’t accept HTML.
>
> /gustav
>
> Fra: Rocky Smolin<mailto:rockysmolin2 at gmail.com>
> Sendt: 2. marts 2022 18:13
> Til: Access Developers discussion and problem solving<mailto:
> accessd at databaseadvisors.com>
> Emne: [AccessD] Bold In an Email
>
> Dear List:
>
> I have an app which creates emails in Outlook through automation and it's
> working well.
>
> Now the client wants to add some formatting - particularly one line that he
> wants to make sure the reader sees.
>
> Just bolding the text might be enough.  Changing the font color to red
> would be even better.
> Highlighting in yellow would, I think, be client's preference.
>
> Google failed to turn up a way to do this that worked for me.  Mostly the
> solutions were HTML which didn't work.  Is there a way to do RTF? Or some
> third way?
>
> MTIA
>
> Rocky
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list