Results 1 to 5 of 5

Thread: BOLDEN it..

  1. #1

    Thread Starter
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    BOLDEN it..

    Using the outlook object model I can create an email and apply the HTMLBody property to change fonts / colors in my code like so:

    VB Code:
    1. Set EmailApp = CreateObject("Outlook.Application")    'using the outlook object
    2.             Set NameSpace = EmailApp.GetNamespace("MAPI")
    3.             Set EmailSend = EmailApp.CreateItem(0)
    4.             EmailSend.Subject = "SOMT Updated Deliverables"
    5.             EmailSend.HTMLBody = "<HTML><CENTER><FONT FACE=ARIAL SIZE=3 COLOR=BLUE><B>JAK - SOMT</B></FONT><BR> <FONT FACE=ARIAL SIZE=3 COLOR=RED><I>Deliverables Updated!</I></FONT></CENTER><BR><FONT FACE=ARIAL SIZE=2>The following task was assigned to you: " & rsTask!Task & ".  The SOMT Tracking ID of this Service Order is:<B> " & rsTask!RecordID & "</B><BR><BR>" & _
    6.                            "Your deliverables have been recently updated to the following: " & "<BR><UL>"
    7.                 Do While Not rsSubTask.EOF
    8.                      EmailSend.HTMLBody = EmailSend.HTMLBody & "<LI><I>" & rsSubTask!DeliverableDescription & "</I></LI><BR>"
    9.                      rsSubTask.MoveNext
    10.                 Loop
    11.             EmailSend.HTMLBody = EmailSend.HTMLBody & Chr(13) & Chr(13) & "</UL>Thank You - <FONT COLOR=BLUE><B>JAK SOMT</B></FONT><BR><BR>Questions, Comments, or Concerns?  Contact the <A HREF=mailto:[email protected]>SOMT-Admin</A></FONT></HTML>"
    12.             EmailSend.Recipients.Add (rsTask!RespPerson & "@tkt-jakusa.thyssenkrupp.com")
    13.             EmailSend.Send
    14.             MsgBox "An e-mail has been sent to " & rsTask!RespPerson & " with their updated Deliverables.", vbInformation, "E-Mail Sent"


    Fine and dandy...if I use the outlook object model and create a task: i.e:

    VB Code:
    1. Set NameSpace = EmailApp.GetNamespace("MAPI")
    2.     Set EmailSend = EmailApp.CreateItem(3)  '3 is a task

    There is no HTMLBody...and the text remains plain. The thing is I need to be able to use bold only on some of the text in the task.
    How can I use Bold only in some portions of the task if there is no HTMLBody property?

    Thanks,
    Jon

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Since you're question has been unanswered for quite some time, I thought I'd venture a guess here. Does the oulook have a Format property? Where you can change it to RichText or HTML?

  3. #3
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431
    I know I've used Outlook [Express] to send HTML emails, so if you can, as mendhak said, change it to HTML, you can simply use <b>My Text Here</b> (which equals My Text Here when shown in another mail program)
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Actually, it's much simpler with OE. But with plain old state-of-the-crap Outlook, they've got a bunch of different formats which cause problems even when using them directly. I won't even get into that.

  5. #5

    Thread Starter
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492
    Yes you can switch it to HTML but thats for the end user to view...
    If I create a task manually I can bold whatever I want by pressing ctrl b. That leads me to believe their is some sort of way of making the text inside an outlook task bold.

    Surely someone who knows Outlook very well has a way to do this programitically?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width