Losing Formatting & Pic Position in Rich Text Template Automated Send

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soule
    New Member
    • Jan 2012
    • 34

    #1

    Losing Formatting & Pic Position in Rich Text Template Automated Send

    Hi, Everyone,

    I'm sending an automated e-mail from an Access form button through Outlook.

    My environment is:
    - Access 2007
    - .accdb file
    - Button code in standard module pointed to with event procedures using Call subs
    - Am in datasheet view when compiling/stepping through/running
    - Early binding w/Intellisense
    - Libraries (in this order):
    VB for Apps
    MS Access 12.0 Obj. Lib.
    MS Outlook 12.0 Obj. Lib.
    MS OFC 12.0 Access db engine Obj. Lib.
    MS VB for Apps Extensibility 5.3
    MS VBScript Regular Expressions 5.5
    MS ActiveX Data Objects 2.8 Lib.
    OLE Automation
    - No compile, step-through or run-time errors

    The Outlook details are:

    - Outlook 2007
    - Options set to send e-mail as Rich Text files
    - My template is saved as a Rich Text .oft file

    My code uses a "Msg.Body = olFormatRichTex t" statement

    Problem:
    My buttons run fine (template opened, populated, sent). I've been using my Outlook account to send the mails to myself for testing. The sends look fine in the "Sent Items" folder, but when I receive them in my Inbox, two aspects of the formatting are messed up.
    1) Any bolding is lost.
    2) The embedded .jpg picture is moved to the bottom of the mail below the text from the top where it should be.

    I'm not sure how to start fixing the loss of bolding issue.

    I've tried everything I could think of to fix the picture position/alignment including changing the positioning options (in line with text, behind text, top & bottom, in front of text, etc.), adjusting the alignment decimals of "absolute positions", using general top/bottom/right or left of margin settings and unchecking "Smart Copy & Paste" option.

    Has anyone dealt with these two problems in a Rich Text send?


    Even small infos. will be very valuable.

    Thank you.

    Frank
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    I'd suggest that if the message looks Ok in your Sent folder but different in your Inbox, the problem is not in the creation of the message, but somewhere further along the line.

    Have you tried the same send to yourself with an RTF message from a different source? No point trying to debug the problem until you've isolated where it lies.

    Incidentally, I believe you're likely to get a better response to these issues in the Access forum than in the VB 4/5/6 forum.

    Comment

    • soule
      New Member
      • Jan 2012
      • 34

      #3
      As it turns out, I decided to go back to HTML template, olformatHTML force in code and set my mail type Outlook option to HTML as well.

      Miraculously, when I removed the graphic due to an administrative request, the mail is received perfectly to internal intranet or external internet recipients whether sent manually or through automation!

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Ha ha, the old mysterious cure from nowhere, don't you love it.

        What I didn't quite get though is, did the problem disappear with the removal of the picture, when using RTF? Or did the removal of the picture coincide with the switch to HTML, or what?

        I have to say, looking forward it's probably smarter to be using HTML anyway. While I have nothing against RTF (use it for some things myself) it is a very old, somewhat Microsoft-specific format, and so seems much more likely to fall out of use.
        Last edited by Killer42; Mar 14 '12, 07:34 AM. Reason: Just added "somewhat".

        Comment

        Working...