Wrox Programmer Forums
|
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
 
Old November 12th, 2004, 05:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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.
 
Old November 16th, 2004, 03:29 AM
Friend of Wrox
 
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please do not post the same topic in more then one forum.

Charul Shukla
 
Old November 20th, 2004, 02:02 PM
Registered User
 
Join Date: Nov 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

record it as a macro first then grab the code from the vba module it creates

 
Old November 21st, 2004, 12:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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

 
Old November 21st, 2004, 12:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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

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

Just found it on amazon

http://www.amazon.com/exec/obidos/tg...71018?v=glance

Charul Shukla
 
Old January 13th, 2005, 06:06 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old June 30th, 2005, 03:44 PM
Registered User
 
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just in case someone else is looking for the answer:

oDoc.Shapes.AddPicture "c:\mypicture.gif",,,oWord.Selection.Range





Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "WORD" document in ASP mcinar Classic ASP Components 9 April 10th, 2007 08:13 AM
Creating word doc. thru .dot or XML document manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 2 March 1st, 2006 07:18 AM
Creating New Document In Word Through vba Hari_Word Excel VBA 1 July 22nd, 2004 05:50 PM
Creating Table dynamically in Word Document ajish_jose Excel VBA 0 September 30th, 2003 11:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.