Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 277
Default Piping data to other office applications

Hello,

Is there a way to have flat file format "table" data on one worksheet
automatically fill data into an MS Word document's "field" areas?

I can build this "report" in excel using simple vlookups and a
scrolling selector for the "unit number", but piping the same data over
to the currently accepted form(s) would be cool.

I know this is probably not the exact correct group for this, but doing
it via a macro would likely be the next logical step, so...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Piping data to other office applications

Hi

Rather than using vb to bring the data in where the formatting can be
no always reliable (particualarily the curning of the words). Why not
use a link between XL and Word. Copy your table in XL, now open your
word document in the place the cursor where you want your table.

Goto Edit - PasteSpecial -

On the form select - Microsoft Office Excel Worksheet Object

Click the Paste Link radio button.

Now when ever your XL sheet changes so will your Word document change
to reflect the changes in XL.

Take care

Marcus

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 277
Default Piping data to other office applications

You failed to see the requisite. Must use existing word document.

I already know how to paste an excel table into word. All I want to do
is paste excel data into an *existing* word document.

I will simply have to construct the entire Word document in Excel if
there is no way to pass the data over.

At that point, (recreating the entire document) the word document would
no longer be needed.

Getting them to incorporate it at work is a different story, however.



On Thu, 10 Dec 2009 20:56:57 -0800 (PST), marcus
wrote:

Hi

Rather than using vb to bring the data in where the formatting can be
no always reliable (particualarily the curning of the words). Why not
use a link between XL and Word. Copy your table in XL, now open your
word document in the place the cursor where you want your table.

Goto Edit - PasteSpecial -

On the form select - Microsoft Office Excel Worksheet Object

Click the Paste Link radio button.

Now when ever your XL sheet changes so will your Word document change
to reflect the changes in XL.

Take care

Marcus

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Piping data to other office applications

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.

Regards,
Ryan--


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


"CellShocked" wrote:

You failed to see the requisite. Must use existing word document.

I already know how to paste an excel table into word. All I want to do
is paste excel data into an *existing* word document.

I will simply have to construct the entire Word document in Excel if
there is no way to pass the data over.

At that point, (recreating the entire document) the word document would
no longer be needed.

Getting them to incorporate it at work is a different story, however.



On Thu, 10 Dec 2009 20:56:57 -0800 (PST), marcus
wrote:

Hi

Rather than using vb to bring the data in where the formatting can be
no always reliable (particualarily the curning of the words). Why not
use a link between XL and Word. Copy your table in XL, now open your
word document in the place the cursor where you want your table.

Goto Edit - PasteSpecial -

On the form select - Microsoft Office Excel Worksheet Object

Click the Paste Link radio button.

Now when ever your XL sheet changes so will your Word document change
to reflect the changes in XL.

Take care

Marcus

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 277
Default Piping data to other office applications

Thank you. That looks like it pretty much covers the entire gamut of
anything I could possibly need. :-)

Thanks again.



On Thu, 10 Dec 2009 23:12:02 -0800, ryguy7272
wrote:

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.

Regards,
Ryan--

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
How can you log users' interactions with MS Office applications? [email protected] Excel Programming 0 July 13th 07 07:08 PM
Launch non-office applications through VBA Madhan Excel Programming 4 February 14th 07 04:47 PM
Office applications will not run fred07 Setting up and Configuration of Excel 2 February 8th 07 07:44 PM
Open Microsoft Office Applications from another computer? mspm45 Excel Discussion (Misc queries) 3 July 30th 05 05:09 PM
Cannot create new? In all office 2003 applications Vakul Excel Discussion (Misc queries) 2 April 25th 05 06:10 AM


All times are GMT +1. The time now is 07:53 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"