Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer from Excel to Word

Status
Not open for further replies.

luckyluci

Structural
Aug 21, 2001
13
Hi,
I want to introduce some data on rows in an Excel sheet and these data to generate at least two different word documents for each row, that use specific templates. In a way, this is similar with Mail Merge but is not the same. I think to combine insert fields use with a macro but.....
How can I do that?
Thank you
 
Replies continue below

Recommended for you

luckyluci:

If you want to take data from excel and transfer it to an existing template, why not just insert fields in the template. You can set the fields up so they update manually (press F9), or you could write a macro that updates the fields from excel.

An easy way to insert feilds is to copy the cells in excel that you want word to link to, then goto word and click on "Edit" and select "Paste Special..." then select the "Paste link:" option button and select "Formatted Text (RTF)" from the box then click ok.

If you don't want the link to update automatically, highlight your field then click on "Edit" and select "Links..." At the bottom of the links box, the update options are listed and you can choose how your field updates.

To update these fields from excel, you can write a macro. I used a commandbutton to update my word document:

Private Sub CommandButton1_Click()
Documents("Document1").Fields.Update
End Sub

You need to make sure that you have referenced Word in VBA for the code to work (click on "Tools" and select "References..." then check the box that coresponds to your version of word while you are in the VBA editor. For word 2000, the box to check is "Microsoft Word 9.0 Object Library").

Hope this helps!

jproj

 
Thank you both!
There are good approaches but I think to something a bit different.
I will be clearer below:
Suppose you will put in the first row on an Excel Sheet the following field name:
Step 1
Project | Client | Subject | By | Check by | ... and so
Step 2
after that you fill first row with information about first project
Step 3
do a "black box" action (this is what I need), and after that, using a template (e.g. Calculation Sheet template, a word document) the data from first row will be transferred in a word doc.
Step 4
fill next row of an Excel file with new data of a second project
Step 5
repeat step 3
Finally you will obtain several doc files and an index in Excel with the possibility to update (link) dynamically.
So I want to transfer information by "one shot".
Any new idea will be appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor