Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Data to a specific location into a word document

I got this code from Ed (thanks), and I was wondering if there was a way to
possible to get this information into a specific location in a document. I
have this existing template and there is this area for these paragraphs, so I
need to see if it can go in that area.

Set a range to encompass all the rows with data
Set objects to Word and a new document
With DataRange
For i = 1 to DataRange.Rows.Count
String1 = "ID: " & .Cells(i,1).Value & ", "
WordDoc.Selection.TypeText String1 & vbCr
String2 = "Description: " & .Cells(i, 2).Value & ", "
WordDoc.Selection.TypeText String2 & vbCr
etc. to last cell
Next i
Save and close Word doc; quit Word, release objects
Save and close Excel file


Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
hyperlinking to a specific page of a word document Miranda Excel Discussion (Misc queries) 1 September 16th 09 11:23 PM
How to hyperlink to a specific location in a Word document? DEVAR Excel Discussion (Misc queries) 6 August 4th 06 06:46 PM
getting specific info from a word document into excel smintey Excel Discussion (Misc queries) 3 December 8th 04 08:20 PM
Getting specific data from a word document into an excel sheet smintey Excel Worksheet Functions 3 December 7th 04 05:17 PM
Opening Word with a specific document from excel vba JRB Excel Programming 5 October 22nd 04 02:11 PM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"