View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Merging from Excel

First, each time I open the Word document, the Excel table appears three
times.
I delete the two extra tables, but obviously I'd like not to have to do
this.


OK, I tried this and it all seemed to work OK here, except that I now get
messages from Excel that I don't remember in previous versions. I'm on Word
2007 SP1. If you use Alt-F9 to view the underlying field codes, what do you
see? For example, I see

{ LINK Excel.Sheet.8 C:\\Users\\pjj.DOMAINX\\Documents\\nr.xlsx
Sheet2!R1C1:R6C4 \a \f 4 \r }

Also, you aren't doing something like pasting into an existing table?

If I paste and link the cell from the spreadsheet
into the letter, I can't merge it into the text, like this:


Yes, at best the data will refresh if you go into Word Mailings etc., open
the Edit recipients dialog box, and "refresh" the data there.

However, I don't think cell reference syntax lets you specify a cell by
using e.g. [a range name]!R2C1 - everything I have tried here so far fails.

If you can name the specific Excel cell you want to insert, and insert that
via Copy/Paste link, the text is not wrapped up in a table and should be
in-line. Whether it will update when expected or you will get error messages
from Excel I cannot say.

There are one or two other possibilities, but it looks as if these days you
have to think in terms of using VBA/VB.NET code.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Joe Parsons" wrote in message
...
I am using Office 2007.

I have an Excel spreadsheet that calculates several loan scenarios. The
results
of the analysis are merged into a Word 2007 document.

The scenarios are presented in a matrix and copied into the Word document.
I
selected the option to link to Excel and use the formatting in the
destination
document.

In the same Word document, I have used MERGEFIELD plus formatting switches
to
present some of the information from the spreadsheet in the text of a
letter.
The source for this data is a two-row named range in the spreasheet, with
the
first row being the names of the fields, the second being the actual data.

I have two problems:

First, each time I open the Word document, the Excel table appears three
times.
I delete the two extra tables, but obviously I'd like not to have to do
this.

Why is this happening, and how can I avoid it?

The second problem is that the merge data from the named range in the
spreadsheet doesn't update unless I close and reopen the Word document.
How can
I get it to update dynamically while still giving me the ability to place
the
data in-line into the text? If I paste and link the cell from the
spreadsheet
into the letter, I can't merge it into the text, like this:

Your present loan is [MERGED AND FORMATTED FROM EXCEL], your rate
is [MERGED AND FORMATTED FROM EXCEL], with a payment of [MERGED AND
FORMATTED FROM EXCEL]

The end results should look like this:

Your present loan is $352,345, your rate is 7.000%, with a payment
of $2,356.

I hope I've explained my problem in an understandable way. Any help will
be
greatly appreciated!

Joe Parsons