 |
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics 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:50 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 16th, 2004, 03:29 AM
|
Friend of Wrox
|
|
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Please do not post the same topic in more then one forum.
Charul Shukla
|

November 20th, 2004, 02:02 PM
|
Registered User
|
|
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
record it as a macro first then grab the code from the vba module it creates
|

November 21st, 2004, 12:08 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi Markm,
Thank you for your help.
I have an another question. I have been modifying another developer's application.
I am trying to find out the steps to access "MICROSOFT WORD" object within ASP 3.0.
Thank you.
mcinar
|

November 21st, 2004, 12:15 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi Charul,
I didn't know that I cannot post the same topic to multiple forms. Since I didn't get help from one form, I decided to post the same topoc for the other ASP related forms.
I am also looking for WROX book "WORD 2000 VBA Programmers". I couldn't find it on the WROX site. If you can, please help me to find it.
Thank you.
mcinar
|

November 22nd, 2004, 06:50 AM
|
Friend of Wrox
|
|
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|

January 13th, 2005, 06:06 PM
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi, mcinar,
Did you solve the problem to insert picture in the btm of word page from ASP?
I have a bookmark(fig1) where I want to place my picture, I use the following codes, but picture is always placed at the top of the page.
curr_document.Bookmarks("fig1").range.select
curr_document.InlineShapes.AddPicture chenv.gif", , true
Can anybody can help me to solve this problem! tks
|

June 30th, 2005, 03:44 PM
|
Registered User
|
|
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just in case someone else is looking for the answer:
oDoc.Shapes.AddPicture "c:\mypicture.gif",,,oWord.Selection.Range
|
|
 |