Re: Is it possible to reference a Microsoft Excel cell in Word?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On 17 Nov 2006 15:18:16 -0800, wardnine@xxxxxxxxxxx wrote:


Jezebel wrote:
Not only possible, but very easy.

Insert a LINK field: { LINK Excel.Sheet [Filename]
[SheetName!CellReference] }. If you open the spreadsheet, copy the cell you
want, then switch to Word, you can use Edit > PasteSpecial with the 'Paste
link' option to do this automatically.

Check Help for the field switches.

You need to double the backslashes in the file name.

You'll make life easier for yourself in the long run if you use named cells,
rather than using cell references. Then your Word references are more
readable and you can rearrange your worksheet without have to change the
Word document.


Thanks for your advice (and also Jay's) as this is what I think I
need for my file. But I'm not sure on the exact syntax to make this
work? I went to Insert->Fields->Links and References->Link. Am I
supposed to type everything in to the white box that appears there at
this point? I typed in:

LINK Excel.Sheet "H:\\Book1.xls" [Sheet1!A1]

EXACTLY as written above (with brackets and quotes and everything) and
got an "Error! Not a valid link." error message. How EXACTLY is this
supposed to be written? Can you tyoe that code directly into the Word
document and get it to work? I am using Word and Excel 2000... thanks
again for any help!!

If you had followed the advice we both gave to use the Paste Special
command, you wouldn't have to worry about any of this. But now you
might as well learn more about the field code syntax.

To fix the error, replace the square brackets with double-quotes:

LINK Excel.Sheet "H:\\Book1.xls" "Sheet1!A1"

You probably also want to include a couple of the optional switches at
the end:

LINK Excel.Sheet "H:\\Book1.xls" "Sheet1!A1" \a \h

The \a switch turns on automatic updating, so changes in the
spreadsheet are reflected in the Word document without having to click
on the field and press F9. The \h switch says to use HTML formatting,
which means the table in Word will appear the same as the table in
Excel.

Ask the Word help about "LINK field" to find out more about the
syntax. Note that in the syntax diagrams in the help, square brackets
around an item mean that it's optional, but you don't type the
brackets in the actual field code.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
.



Relevant Pages

  • Re: ESC cooling ?
    ... having to set switches for the cell count.... ... I addressed the heating vs supply voltage issue last thing in my response. ... >> much current will overheat the BEC portion of your ESC. ... >>> it for me) and it will switch automatically. ...
    (rec.models.rc.air)
  • Re: Conditional Cell Validation v2.0 (Clarification)
    ... B1 has different drop down lists) Can I force a default value? ... Now I go BACK and switch A1 to NO, here, B1 remains at 5%. ... the Zero value, the Percent in B1 is still affecting othe calculations. ... > Type a zero in a cell ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Different shape width in different views in Excel 2007??
    ... I completely agree that in most cases no Excel user will bother about this issue. ... > the shape still fits exactly in the cell. ... For testing, set the width of column A in Normal view to almost the paper size width, create a shape in this column with the same width and switch to Page Layout view. ...
    (microsoft.public.excel)
  • Re: blank when zero
    ... My original post was dealing with formfield bookmark names vice table cell ... references and your formula is correct. ... I am unable to make Suzanne's switch or any other switch return a ... Even if I enter 0 in either of the>>> two variable fields or both I am still getting a display>>> 0.00 in the calculation field using your switch. ...
    (microsoft.public.word.tables)
  • Re: MS Word table - problem with conditional formula
    ... You can safely delete the \* MERGEFORMAT switch. ... Note that you mast have a '=' sign in the second field, ... the Fillin and using Insert> Bookmark named it CellB2. ... Table cell referencing doesn't work with text strings. ...
    (microsoft.public.word.tables)