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

Posted on 2008-11-19
Medium Priority
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
  • 3
  • 2
LVL 20

Expert Comment

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


Author Comment

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

Expert Comment

ID: 22993616
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

ID: 22993631
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


Accepted Solution

DennisPost earned 0 total points
ID: 23040898
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.


Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

850 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