Data to a specific location into a word document

A

Adam

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top