Change color for docmd subject line

G

Guest

Hi!

I have a code that goes something like this

Dim strSub1, strSub2 As String
strSub1 = "Hello "
strSub2 = "world"
strSub1 = strSub1 & strSub2
DoCmd.SendObject , , , "(e-mail address removed)", , , strSub1

I want the second part of the subject (strSub2) to be red (or some other
color that's different from strSub1) when this code is triggered. Does anyone
how to do this? Any help would be appreciated. Thank you.
 
G

Guest

Jae,

Why would you want that? In VBA there are a couple of colors and they all
have a pretty specific purpose.

Red means somethings not right with the code you have written (a great
indicator)
Yellow shows the step process when stepping through code
Green means the code is commented being information provided by the
developer or some specific line of code being disabled
Black being the regular color for the code.

My advice would be don't use colors in your code. It's not meant to be a
wordprocessor with formatting possibilities.

And while activating code your users won't see this because that's not the
point of coding something. If it's just for personal use and you want to see
the designated values just hoover your mouse over the variables being set and
you will see a tooltip appear.

hth
 
G

Guest

Dear Maurice,

Thank you for your answer. I don't think I was very clear on my question. I
don't neet to have it red in the VB editor. I need to have it red in the
e-mail content. I know if I want to mak it all upper case, I would do
something like this: Ucase(strBody2). I want to make it different color
instead of making a different case. I'm hoping it would be something simple
like Font(strBody2, vbRed). Thank you.
 
G

Guest

Jae,

Sorry for the misunderstanding. I understand now what you mean. I've tried
formatting the body while sending a mail from Access. Didn't get it to work.
My guess is that you have to program that from within outlook.
 

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