Exporting weekly data from different sheets to a word document

J

jfp

Hi there,

I populate excel sheets with weekly data to gather a series of info over a
period of time.

I then send some of the weekly info off in a word document which reviews
some of the info (and so only pick certain bits of the info).

The word document is the same every week - I am looking for a solution which
takes the latest data from the spreadsheet to the word file with the
corresponding date. Can I direct certain cells to the relevant table in the
word file?

Does that make sense?

Thanks
 
R

ryguy7272

Here is one option:
http://www.erlandsendata.no/english/index.php?d=envbaolecontrolword

Take a look at this:
http://word.mvps.org/FAQs/InterDev/ControlWordFromXL.htm

This too:
http://addbalance.com/usersguide/fields.htm

And this:
http://gregmaxey.mvps.org/Word_Fields.htm

Finally, once you get the DocVariable fields set up in Word (hit Alt + F9 to
see all fields), run this code from Excel.
Sub PushToWord()

Dim objWord As New Word.Application
Dim doc As Word.Document
Dim bkmk As Word.Bookmark
sWdFileName = Application.GetOpenFilename(, , , , False)
Set doc = objWord.Documents.Open(sWdFileName)

With doc
..Variables("VarNumber1").Value = Range("VarNumber1").Value
..Variables("VarNumber2").Value = Range("VarNumber2").Value
'etc
..Range.Fields.Update
End With

'ActiveDocument.Fields.Update

objWord.Visible = True

End Sub

Note: This code runs in Excel; pushes Excel variables (assigned as Named
Ranges) to Word. Make sure you set a Reference to Word, under Tools >
References.

HTH,
Ryan---
 
J

jfp

Thank you for such a quick response.

No doubt one of those solutions will sort me out. Am off to look them up.

Many thanks again.
 

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