473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

MS word document

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.
Oct 31 '05 #1
4 5891
josepe wrote:
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

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Oct 31 '05 #2
> 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?


Besides reverse engineering as Bob suggested, MS has a document
associated with HTML and office products and all the attributes that
you can set:

http://msdn.microsoft.com/library/de...asp?frame=true

Nov 1 '05 #3


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.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 2 '05 #4
Josep Estudis Figueras wrote:
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.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Nov 2 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Microsoft | last post by:
I'm trying to display a word document inside a web page, but everytime I do I get this error: Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied: 'CreateObject' Does...
4
by: Otis Hunter | last post by:
I have been given an Access Database which contains a table that has an OLE object field that contains a Word document. That table contains hundreds of records. I would like to find out how I can...
7
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the...
3
by: Adam Faulkner via DotNetMonster.com | last post by:
I want to create a method within a class that opens a Microsoft Word 2000 Document and has the facility to Create a new word document and then extract a Page that exists within the original Word...
1
by: Adam Faulkner via DotNetMonster.com | last post by:
I had a problem before extracting pages from an existing word document and then inserting the content into a new word document. The following code below works with Microsoft Word 2000 Function...
3
by: Niyazi | last post by:
Hi, Its like a I am searching alot but still not found or satisfy what I found it. My question is that I had SQL server that contains some data. I also have a application folder call...
2
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
0
southoz
by: southoz | last post by:
Good ay all , I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such as this and in doing so will share that information...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.