Hello,
I want to do a Ms Word document in a ASP page.
I can do it, With the code lines:
/////
Response.Conten tType = "applicatio n/msword"
Response.AddHea der "content-disposition", "inline; filename=OrderF ax.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. 4 5903
josepe wrote: Hello,
I want to do a Ms Word document in a ASP page. I can do it, With the code lines: ///// Response.Conten tType = "applicatio n/msword" Response.AddHea der "content-disposition", "inline; filename=OrderF ax.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"
> 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
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.Conten tType = "applicatio n/msword"
Response.AddHea der "content-disposition", "inline;
filename=OrderF ax.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 ***
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.Conten tType = "applicatio n/msword" Response.AddHea der "content-disposition", "inline; filename=OrderF ax.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" This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 anybody know the correct way to do this? I don't want to link to a
document, but rather display a word file inside the asp page.
|
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 write a VB
script, to be executed either within Access or executed at the CMD
prompt, which will loop through all the records and open the document
object and save it to a Word document that I can access from Windows
Explorer. An additional info...
|
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 user and populated
(with info from an Access database) at run-time, then saved as Word
documents. The program I have coded works fine -- it does what I need
it to do. But it has two problems: (1) it runs very slowly, and (2) it
does not seem to...
|
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 Document and save it to a new
Word Document.
I would need to generate a loop for each page found within a word document to
create a new word document and insert the existing page into the new word
document and then save as a new word document.
...
|
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 ParseWordDoc(ByVal Filename As String) As String
Dim sNewFileName As String
Dim WordApp As Word.Application = New Word.Application
Dim BaseDoc As Word.Document
Dim DestDoc As Word.Document
| |
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 CUSTDOCUMENT.
Once user cliks a button to retrive a document about the customer I need to
program in this order:
|
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 confirm that I want to run a query to select the data from the data source file, then it opens the form letter fine. I can preview the merged records and complete a merge to a new document.
I have a VB 2006 project (.net framework 2.0) which opens the...
|
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 to register new customer or
companies they will enter the information in Windows Form and the program
automaticaly creates the WORD document under specific folder under
application path. Once the empty word file created than ask user if they want...
|
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 with others. I have seen many request for information on mail merging an how to send data to word documents this is something I have put together with the answers given by others and I hope this will help a few newbies , I know there are easier ways...
|
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 this: can Access create
the document and place it as an OLE object to the relevant table?
Any help is greatly appreciated.
Ricky
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |