Outlook does not print all self made html emails with the correct magins

Posted on 2008-11-19
Last Modified: 2013-11-19
We create emails via our inhouse vb6 application.
Html code is generated in the vb6 application, then a new outlook email is opened with the code.
.BodyFormat = olFormatHTML
.HTMLBody = HTMLCode

The latest one I created always prints with wide magins i.e. 25mm instead of 5mm

How can I adjust the code so that people who receive the emails do not have to manually adjust the margins to print the email as it should be viewed?
Or is this simply an Outlook 2003 configuration question?

I think it has something to do with the header. unfortunately my html skills aren't that well developed.

When printing from ie7 or firefox, all is well.

vb6 code and or usable code on request. (Might make the question a but intimidating....)

Question by:DennisPost
    LVL 20

    Expert Comment

    you can set page height, width, top margin, left margin in the html. and central alignment

    LVL 2

    Author Comment

    That's sounds useful, do have the code/ syntax for me?
    LVL 20

    Expert Comment

    something like..

    <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <!--u can try with % to adjust the width and height
    <table border="0" cellpadding="0" cellspacing="0"  width="90%" height="80%" align="center">
    <table border="0" cellpadding="0" cellspacing="0"  width="500" align="center">
    write whatever you like to send

    Open in new window

    LVL 20

    Expert Comment

    or align the message

    align = left, center, right
    valign = top,middle,bottom

    <td align="center" valign="middle">
    write whatever you like to send

    Open in new window

    LVL 2

    Accepted Solution

    Turned out to be an outlook setting.
    When creating a new email goto File | Page Setup
    Change the left and right margins, then click the "Default...." button.

    I have attached a picture.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Title # Comments Views Activity
    How to represnt 52 selections 1 22
    html select on change 3 12
    Search Outlook Items 13 23
    Outlook 2016 Question 2 6
    Use email signature images to promote corporate certifications and industry awards.
    Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
    In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
    The viewer will learn how to dynamically set the form action using jQuery.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now