View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Cherry Lake Tree Farm
 
Posts: n/a
Default Mail merge and hyperlinks

Your information was very helpful, however, the procedure only picked up the
first hyperlink and I have a different hyperlink for each of the entries in
my Excel spreadsheet. Is there a way to modify the code so it will use a
different hyperlink for each merged record?

"Peter Jamieson" wrote:

If you just want the column, as is, you should be able to copy/paste it into
Word.

If you want the hyperlink from each row separately, things are more
difficult. You /may/ be able to do something along the following lines:
a. Open the spreadsheet
b. in Word, create your merge main document in the usual way
c. Select the heading cell of the Excel column contiaining the Hyperlinks,
and Edit|Copy.
d. In word at the point where you want the hyperlink, Edit|Paste Special,
check the Paste Link button, and choose HTML format (or maybe RTF format)
e. Use Alt-F9 to show the field code in Word. It should be something like

{ LINK Excel.Sheet.8 "C:\\myfolder\\mysheet.xls" Sheet1!R1C2 \a \f 4 \h }

f. Put double quotes around the sheet reference if they are not already
there.

Then insert the following nested field instead of the "1" after the "R"

{ ={ MERGEREC }+1 }

Use ctrl-F9 to insert the {}, don't just type the {} characters.

So now you have something like

{ LINK Excel.Sheet.8 "C:\\myfolder\\mysheet.xls" "Sheet1!R{ ={
MERGEREC }+1 }C2" \a \f 4 \h }

Then try merging to a new document. You will probably have to select the new
document and press F9 to update all the fields.

There are lots of reasons why this process may fail, so if you can't get it
to work I wouldn't try too hard. I also wouldn't rely on it too heavily. For
example, if you select the LINK field and re-execute it with F9, the fields
you added may disappear. You may find it useful to check/uncheck Word
Tools|Options|Print|Update fields and/or Update Links, and it you may also
find it useful to uncheck Word Tools|Options|General|Web
options|Files|Update links on save.

Peter Jamieson

"Dimitris" wrote in message
...
Assume that you have an excel column filled with titles of some pdf
documents. Each one of these titles are also HYPERLINKED to the
corresponding
pdf file, so one can open the file by pressing the title that he wants. I
want to make a ormatted document in Word thatwill also contain the column
of
titles i already mentioned. I use the mail merge but after it is completed
the titles appear as plain text and the hyperlinks have dissapearead. Is
there anything i do wrong??