Welcome to Lockergnome.com!
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

How to reduce bottom margin when printing HTML in Word

 
   Home -> Office -> Page Layout RSS
Next:  Page Layout: Web Layout View VS Print Layout View  
Author Message
Jeroen Elias

External


Since: Aug 06, 2007
Posts: 2



(Msg. 1) Posted: Mon Aug 06, 2007 11:46 am
Post subject: How to reduce bottom margin when printing HTML in Word
Archived from groups: microsoft>public>word>pagelayout (more info?)

Hello,

We have an intranet application running which produces HTML when a link is
clicked by a user and gives that to the IE browser using custom headers
(ContentType=application/msword)
This way, the browser loads MS Word and presents the content. Until here,
all works fine.

In this HTML we set the BODY style to "margin-left: -60pt". This way the
table is placed more to the left on the page than using default margins.
The page contains a large table (at least 100 rows), which is split by MS
Word at every page break.
When the user starts to printout the "document", the bottom margin is too
large for our purpose.
We have tried using the "margin-bottom: -60pt" style to the body, to no
avail.

Has anyone out here had a similar problem and if so, how can I get this
working?

Thanks in advance,

Jeroen Elias
Back to top
Login to vote
"Robert M. Franz

External


Since: Jun 16, 2005
Posts: 978



(Msg. 2) Posted: Wed Aug 08, 2007 8:31 pm
Post subject: Re: How to reduce bottom margin when printing HTML in Word [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Jeroen

Jeroen Elias wrote:
> We have an intranet application running which produces HTML when a link is
> clicked by a user and gives that to the IE browser using custom headers
> (ContentType=application/msword)
> This way, the browser loads MS Word and presents the content. Until here,
> all works fine.

Any particular reason why you're not serving the HTML in the browser itself?


> In this HTML we set the BODY style to "margin-left: -60pt". This way the
> table is placed more to the left on the page than using default margins.
> The page contains a large table (at least 100 rows), which is split by MS
> Word at every page break.
> When the user starts to printout the "document", the bottom margin is too
> large for our purpose.
> We have tried using the "margin-bottom: -60pt" style to the body, to no
> avail.

I don't think this will help. Word will translate the margin-left into a
(negative) paragraph indent. But a paragraph cannot have a negative
lower or upper indent. For that, page margins are relevant in Word. And
HTML, alas, has no "page" ...

I'd investigate what template is used when the document is served. Look
at Tools | Templates and Add-Ins. If it's Normal.dot, you could
technically try changing the page margins there. Though I'm not sure
this is enough to fiddle with each users' copy.

..2cents
Robert
--
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word
Back to top
Login to vote
bugmenot




Joined: Mar 12, 2007
Posts: 20



(Msg. 3) Posted: Thu Nov 08, 2007 10:49 pm
Post subject: [Login to view extended thread Info.]

Add this to your style section:
@page Section1
{size:8.5in 11.0in;
margin:.5in .5in .5in .5in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}

then create a div with all your content in it.

<div class=Section1>
type your content here...
</div>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Page Layout All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 General
 Microsoft Windows XP
 Microsoft Windows Vista
 Microsoft Windows (other)
  Microsoft Office
 Microsoft Office (other)
 Computer Security
 Linux
 Movies


[ Contact us | Terms of Service/Privacy Policy ]