Export cell data to a template in Word

M

mike

Good Morning All,

I have worked with macros in Excel before and with the help of this
discussion board managed to make some very complicated stuff work.

Now, I have a different problem...

I have data in an Excel sheet and based on that data I must compile a report
in Word.

The sheet is structured as follows:

Criteria - Company A - Company B - Company C

Info 1
Info 2
Info 3


Is it possible to create a macro to take information from each criteria and
each company and export that information to a template in Word (Basically
filling in the blanks). If it is possible, where should I begin?

Thanks,

Mike
 
A

aidan.heritage

Good Morning All,

I have worked with macros in Excel before and with the help of this
discussion board managed to make some very complicated stuff work.

Now, I have a different problem...

I have data in an Excel sheet and based on that data I must compile a report
in Word.

The sheet is structured as follows:

Criteria - Company A - Company B - Company C

Info 1
Info 2
Info 3

Is it possible to create a macro to take information from each criteria and
each company and export that information to a template in Word (Basically
filling in the blanks). If it is possible, where should I begin?

Thanks,

Mike

Yes, no problem at all - something like



Dim appwd As Object
On Error GoTo notloaded
Set appwd = GetObject(, "Word.Application")
notloaded:
If Err.Number = 429 Then
Set appwd = CreateObject("Word.Application")
End If
appwd.Visible = True
On Error GoTo 0
With appwd
.documents.Add Template:="Path and Name of Template"
'now fill out the document
appwd.activedocument.bookmarks("Whatever").Range.Text =
Range("Wherever").Value

end with
set appwd=nothing
 

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