K
Konstantin Loguinov
Folks,
Here is the set up. A have an excel spreadsheet that runs some numbers.
After the numbers are calculated, it creates several tables with the
results. Now, I could simply copy and paste the tables into a word document,
but that's not very efficient. I set up a Word document template that I want
to populate it with a click of a mouse. Here is the code
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim i As Integer
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open("C:\optispeed.doc")
wrdDoc.Bookmarks("General").Range.Text =
Sheets("Results").Range("B2").Value
Set wrdDoc = Nothing
Set wrdApp = Nothing
It works only if I try to export just one cell. However, I want to export a
range of cells and put into a bookmark. Is it possible? If so, what am I
doing wrong?
Thanks!
Konstantin
Here is the set up. A have an excel spreadsheet that runs some numbers.
After the numbers are calculated, it creates several tables with the
results. Now, I could simply copy and paste the tables into a word document,
but that's not very efficient. I set up a Word document template that I want
to populate it with a click of a mouse. Here is the code
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim i As Integer
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open("C:\optispeed.doc")
wrdDoc.Bookmarks("General").Range.Text =
Sheets("Results").Range("B2").Value
Set wrdDoc = Nothing
Set wrdApp = Nothing
It works only if I try to export just one cell. However, I want to export a
range of cells and put into a bookmark. Is it possible? If so, what am I
doing wrong?
Thanks!
Konstantin