MS word document

J

josepe

Hello,

I want to do a Ms Word document in a ASP page.
I can do it, With the code lines:
/////
Response.ContentType = "application/msword"
Response.AddHeader "content-disposition", "inline; filename=OrderFax.doc"
////
With these lines all document content show like a Word document.

But i can not change the MARGINS of this Word document.And Default
left/right margins are very bigs.
I try it, change the <body> attributes and with styles, but this don't work,
the margins are always the same.

How can i modify the margins of word document?
I should do this with another method?
Can I modify PC client settings to change the defaults margins of word
document create througt the web?

Some idea?

Thanks a lot.
 
B

Bob Barrows [MVP]

josepe said:
Hello,

I want to do a Ms Word document in a ASP page.
I can do it, With the code lines:
/////
Response.ContentType = "application/msword"
Response.AddHeader "content-disposition", "inline;
filename=OrderFax.doc" ////
With these lines all document content show like a Word document.

But i can not change the MARGINS of this Word document.And Default
left/right margins are very bigs.
I try it, change the <body> attributes and with styles, but this
don't work, the margins are always the same.

Create a document in Word that has the margin settings you want. Then save
it to html and view its source to see the html you need to generate to set
the margins.

Bob Barrows
 
J

Josep Estudis Figueras

Ok bob,
I do it, but don't works.

I put all the text that Word generate for the html file with correct
margins.
And append to this file this code:
////
Response.ContentType = "application/msword"
Response.AddHeader "content-disposition", "inline;
filename=OrderFax.doc"
////
to the asp file.

And the result is the same.
Open Ms Word file with correct data but wrong margins, always the same
long margins.

Some idea?

Thanks a lot.
 
B

Bob Barrows [MVP]

Josep said:
Ok bob,
I do it, but don't works.

I put all the text that Word generate for the html file with correct
margins.
And append to this file this code:
////
Response.ContentType = "application/msword"
Response.AddHeader "content-disposition", "inline;
filename=OrderFax.doc"
////
to the asp file.

And the result is the same.
Open Ms Word file with correct data but wrong margins, always the same
long margins.

Some idea?

Other than suggesting that you read the link provided by Larry, none.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top