View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] joe@pfscalifornia.com is offline
external usenet poster
 
Posts: 2
Default Merging from Excel

On Jan 10, 12:04*pm, "Peter Jamieson"
wrote:
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.


When I paste the link from Excel into Word, it generates this code:
{LINK Excel.Sheet.8 "[path]" "[cell name]" \a \f5 \h \* MERGEFORMAT}

I can't find any references to the \a or \h codes, but the value
returned by the link is always on a new line.

Naming the range doesn't seem to have any effect. Is there some kind
of undocumented switch to keep it from appearing on the new line?

Thanks for the help.

Joe Parsons