Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 12th, 2004, 04:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
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.
Reply With Quote
  #2 (permalink)  
Old November 16th, 2004, 02:29 AM
Friend of Wrox
 
Join Date: May 2003
Location: Delhi, Delhi, India.
Posts: 230
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Charul Shukla
Reply With Quote
  #3 (permalink)  
Old November 20th, 2004, 01:02 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old November 21st, 2004, 11:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
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

Reply With Quote
  #5 (permalink)  
Old November 21st, 2004, 11:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
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

Reply With Quote
  #6 (permalink)  
Old November 22nd, 2004, 05:50 AM
Friend of Wrox
 
Join Date: May 2003
Location: Delhi, Delhi, India.
Posts: 230
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
Reply With Quote
  #7 (permalink)  
Old January 13th, 2005, 05:06 PM
Friend of Wrox
 
Join Date: Jan 2005
Location: Houston, TX, USA.
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

Reply With Quote
  #8 (permalink)  
Old June 30th, 2005, 03:44 PM
Registered User
 
Join Date: Jun 2005
Location: , , .
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06: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



All times are GMT -4. The time now is 04:44 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.