exporting data to appear at Bookmarks in a Word Document

D

Dave Kilroy

Hi - I just posted this query but forgot to include my sample VBA code -
oops! hope its been deleted as being obviously missing something.

I'm stuck so I'm calling Ghost Busters!

I need a macro to copy text from various cells (plus a graph), open a Word
document and insert the strings of text one by one at various Bookmarks ...

Below is one of the macros I've been trying to get working, and it feels I'm
pretty close but just can't seem to be able to select anything in Excel to
copy to Word

What am I doing wrong?
----------------------------------------------------------------------
Sub BookMark()

Dim wordApp As Word.Application

Set wordApp = CreateObject("Word.Application")

With wordApp

.Visible = True
.Documents.Open Filename:="G:\BRIAN Phase 3\BRIAN_Report_Form.doc",
ReadOnly:=True


.ActiveDocument.Bookmarks("SEName").Select
.Selection.Text = Sheets("Action_Points").Text1

End With

Set wordApp = Nothing

End Sub
 

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