Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jfp jfp is offline
external usenet poster
 
Posts: 4
Default Exporting weekly data from different sheets to a word document

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Exporting weekly data from different sheets to a word document

Here is one option:
http://www.erlandsendata.no/english/...olecontrolword

Take a look at this:
http://word.mvps.org/FAQs/InterDev/C...WordFromXL.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---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"jfp" wrote:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
jfp jfp is offline
external usenet poster
 
Posts: 4
Default Exporting weekly data from different sheets to a word document

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.


"ryguy7272" wrote:

Here is one option:
http://www.erlandsendata.no/english/...olecontrolword

Take a look at this:
http://word.mvps.org/FAQs/InterDev/C...WordFromXL.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---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"jfp" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting excel cell contents to word document kaiser Excel Programming 2 September 12th 05 11:24 AM
Exporting multiple cell contents into word document Davy L Excel Worksheet Functions 1 September 6th 05 04:06 AM
exporting data to appear at Bookmarks in a Word Document Dave Kilroy Excel Programming 0 May 19th 05 05:55 PM
Exporting VBA DataForm Info to Word document bg18461[_10_] Excel Programming 2 November 9th 04 11:21 PM
Exporting text to a Word document Ian M[_2_] Excel Programming 1 May 3rd 04 04:25 AM


All times are GMT +1. The time now is 08:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"