 |
Classic ASP Components Discussions specific to components in ASP 3. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

November 12th, 2004, 05:49 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Creating a "WORD" document in ASP
Hi All,
I am creating a "Word" document in ASP 3.0.
I need help to insert a "Picture - gif file" at the bottom of the document.
I tried the following codes;
"
dim oWord, oDoc, rangeBold
Set oWord = CreateObject("word.application")
oWord.Application.Visible = true
Set oDoc = oWord.Documents.Add()
' Creating a new paragraph
Set rangeBold = oDoc.Paragraphs.Add.Range
rangeBold.InsertBefore("Signature")
rangeBold.font.bold = True
rangeBold.font.size = 11
rangeBold.font.name = "Arial"
' Inserting a "Picture' file.
oDoc.Shapes.AddPicture "c:\mypicture.gif"
"
It inserts the "Picture" file on the top of the document, which is correct. Because I didn't specify a certain paragraph range for the picture file. But, I don't know the syntax.
I also need a syntax for "Full justify".
Thanks for your help,
mcinar
__________________
MCinar
Love all the creatures because of the creator.
|

November 13th, 2004, 12:23 PM
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi mcinar,
I have the almost same problem related to word application in ASP 3.0. what is my problem is, i could not create object for Word.Application. what did you do getting work with word.application. should we have to install the MS Word in Web Server or do you know from where we can get the Word.Application DLL through Online.
reply me soon !!!!!
Joseph
|

November 14th, 2004, 11:16 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi Joseph,
I was modifying the existing codes at the different location. And, I tried to test it in my environment.
I had the similar problem that you had and I will try to find out and let you know.
Take care...
mcinar
|

December 3rd, 2004, 10:23 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi Dokkyo,
Your information was very helpful and it solved my problem.
Thanks for your help.
mcinar
|

December 3rd, 2004, 10:25 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi Joseph,
I got some help from "Dokkyo" and it helpmed me.
Here is the information;
This might solve your problem regarding createObject:
http://support.microsoft.com/support.../q195/8/26.asp
as for the original posting, you might find some samples here under client-side solutions to help you out:
http://msdn.microsoft.com/library/de...sofficedev.asp
It's an issue with security settings since the server is essentially attempting to open up an application on the client side.
Take care...
mcinar
|

March 13th, 2006, 02:05 AM
|
Registered User
|
|
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Set oWord = CreateObject("word.application")
oWord.Application.Visible = true
Set oDoc = oWord.Documents.Add()
When I try to run this code it is giving me this error.
Microsoft Word (0x800A175D)
Could not open macro storage.
/heloc/word.asp, line 6
Please it is very urgent.
|

February 24th, 2007, 02:21 AM
|
Registered User
|
|
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi All,
I am creating a "Word" document in ASP 3.0.
my code is working proprly in explorer-MS Internet Explorer
but it gave problem in mozilla firefox.
i think, i have wrong written contenttype.
my code is below.............
-------------start code---------
Response.ContentType = "text/Doc"
response.AddHeader "content-disposition", "attachment; filename="NILESH PATEL" .Doc"
Response.write "NAME :NILESH PATEL " & vbcrlf
response.write "FULL NAME : NILESH PATEL M." & vbcrlf
response.write "JOB TITLE:PROGRAMMER" & vbcrlf
-------------end of code---------
i also use mcinar's code but it will gave me error
like-Microsoft Word (0x800A175D)
Could not open macro storage.
I also need a syntax for "Full justify".
Thanks in advance for your help,
NILESH PATEL
|

March 12th, 2007, 07:41 AM
|
Authorized User
|
|
Join Date: Jan 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
dokkyo has given a very useful urls
-Saurabh
|

April 10th, 2007, 08:13 AM
|
Registered User
|
|
Join Date: Apr 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i have to create a word document with header and footer.the text to be displayed is in entered into a text box and button is pressed then word is to be generated.i should not use the msword object. i have to use only xml/xslt.it should be in c#..... can you help me
|
|
 |