Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Compass Rose Compass Rose is offline
external usenet poster
 
Posts: 29
Default Referencing an imbedded Excel worksheet

I have a Word document that contains an imbedded Excel worksheet. One of the
cells of the worksheet can have an either positive or negative value. I have
some text in my document that has to be either "increased by" or "reduced
by", depending on the value of the cell in the Excel worksheet.

Can that cell be referenced with a FIELD (or otherwise)?

TIA
David

P.S. If I have to, I can change the imbedded worksheet to a table with
formulas in it, and bookmark the cell of the table, but its not my first
choice.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Referencing an imbedded Excel worksheet

In Word 2003, once you have embedded the Excel sheet, if you
a. select the cell
b. right-click, copy
c. in Word, Edit|Paste Special and choose Link and Unformatted text, then
you should see a

link field along the lines of

{ LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }

When you update the embedded object, the link also updates, but
a. I have never used this technique in a production system
b. on my test system it was very slow, and I even saw a message or dialog
box about Word wiating for an OLE operation to finish
c. I do not know what exactly the _1224002984 refers to, or in what
circumstances this reference ID might change. if you rename the document in
Windows Explorer, the link is unlikely to update correctly (you could
consider using an embedded field such as { FILENAME /p } instead but I
haven't tried).
d. you may find that the value of Word Tools|Options|General|Web
options|Files|"Update links on save" has an impact on whether or not this
field evaluates correctly

Peter Jamieson

"Compass Rose" wrote in message
...
I have a Word document that contains an imbedded Excel worksheet. One of
the
cells of the worksheet can have an either positive or negative value. I
have
some text in my document that has to be either "increased by" or "reduced
by", depending on the value of the cell in the Excel worksheet.

Can that cell be referenced with a FIELD (or otherwise)?

TIA
David

P.S. If I have to, I can change the imbedded worksheet to a table with
formulas in it, and bookmark the cell of the table, but its not my first
choice.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Compass Rose Compass Rose is offline
external usenet poster
 
Posts: 29
Default Referencing an imbedded Excel worksheet

Thanks, Peter. I'm running Word 2002, but I don't think that makes a
difference.

Expanding on your thinking, I tried this:
{Ref { LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }\# " 'increased by '; 'reduced by ' "}

but got this:
Error! Reference source not found.

I'm stumped. Anybody else have a brain wave?

David


"Peter Jamieson" wrote:

In Word 2003, once you have embedded the Excel sheet, if you
a. select the cell
b. right-click, copy
c. in Word, Edit|Paste Special and choose Link and Unformatted text, then
you should see a

link field along the lines of

{ LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }

When you update the embedded object, the link also updates, but
a. I have never used this technique in a production system
b. on my test system it was very slow, and I even saw a message or dialog
box about Word wiating for an OLE operation to finish
c. I do not know what exactly the _1224002984 refers to, or in what
circumstances this reference ID might change. if you rename the document in
Windows Explorer, the link is unlikely to update correctly (you could
consider using an embedded field such as { FILENAME /p } instead but I
haven't tried).
d. you may find that the value of Word Tools|Options|General|Web
options|Files|"Update links on save" has an impact on whether or not this
field evaluates correctly

Peter Jamieson

"Compass Rose" wrote in message
...
I have a Word document that contains an imbedded Excel worksheet. One of
the
cells of the worksheet can have an either positive or negative value. I
have
some text in my document that has to be either "increased by" or "reduced
by", depending on the value of the cell in the Excel worksheet.

Can that cell be referenced with a FIELD (or otherwise)?

TIA
David

P.S. If I have to, I can change the imbedded worksheet to a table with
formulas in it, and bookmark the cell of the table, but its not my first
choice.




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Referencing an imbedded Excel worksheet


You should be able to use the numeric switch in the LINK field:

{ LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t \# " 'increased by
'; 'reduced by ' "}

(A REF field has to refer to an existing /bookmark/.)

Peter Jamieson

"Compass Rose" wrote in message
...
Thanks, Peter. I'm running Word 2002, but I don't think that makes a
difference.

Expanding on your thinking, I tried this:
{Ref { LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }\# " 'increased
by '; 'reduced by ' "}

but got this:
Error! Reference source not found.

I'm stumped. Anybody else have a brain wave?

David


"Peter Jamieson" wrote:

In Word 2003, once you have embedded the Excel sheet, if you
a. select the cell
b. right-click, copy
c. in Word, Edit|Paste Special and choose Link and Unformatted text,
then
you should see a

link field along the lines of

{ LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }

When you update the embedded object, the link also updates, but
a. I have never used this technique in a production system
b. on my test system it was very slow, and I even saw a message or
dialog
box about Word wiating for an OLE operation to finish
c. I do not know what exactly the _1224002984 refers to, or in what
circumstances this reference ID might change. if you rename the document
in
Windows Explorer, the link is unlikely to update correctly (you could
consider using an embedded field such as { FILENAME /p } instead but I
haven't tried).
d. you may find that the value of Word Tools|Options|General|Web
options|Files|"Update links on save" has an impact on whether or not this
field evaluates correctly

Peter Jamieson

"Compass Rose" wrote in message
...
I have a Word document that contains an imbedded Excel worksheet. One of
the
cells of the worksheet can have an either positive or negative value. I
have
some text in my document that has to be either "increased by" or
"reduced
by", depending on the value of the cell in the Excel worksheet.

Can that cell be referenced with a FIELD (or otherwise)?

TIA
David

P.S. If I have to, I can change the imbedded worksheet to a table with
formulas in it, and bookmark the cell of the table, but its not my
first
choice.






  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Compass Rose Compass Rose is offline
external usenet poster
 
Posts: 29
Default Referencing an imbedded Excel worksheet

We're almost there! It works if the number is positive, but if the number is
negative, I get the actual contents of the cell [eg $(251.00)]. There must be
something wrong with the syntax, but I don't see what it is. Were you able to
get it to work at your end?

David

"Peter Jamieson" wrote:


You should be able to use the numeric switch in the LINK field:

{ LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t \# " 'increased by
'; 'reduced by ' "}

(A REF field has to refer to an existing /bookmark/.)

Peter Jamieson

"Compass Rose" wrote in message
...
Thanks, Peter. I'm running Word 2002, but I don't think that makes a
difference.

Expanding on your thinking, I tried this:
{Ref { LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }\# " 'increased
by '; 'reduced by ' "}

but got this:
Error! Reference source not found.

I'm stumped. Anybody else have a brain wave?

David


"Peter Jamieson" wrote:

In Word 2003, once you have embedded the Excel sheet, if you
a. select the cell
b. right-click, copy
c. in Word, Edit|Paste Special and choose Link and Unformatted text,
then
you should see a

link field along the lines of

{ LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }

When you update the embedded object, the link also updates, but
a. I have never used this technique in a production system
b. on my test system it was very slow, and I even saw a message or
dialog
box about Word wiating for an OLE operation to finish
c. I do not know what exactly the _1224002984 refers to, or in what
circumstances this reference ID might change. if you rename the document
in
Windows Explorer, the link is unlikely to update correctly (you could
consider using an embedded field such as { FILENAME /p } instead but I
haven't tried).
d. you may find that the value of Word Tools|Options|General|Web
options|Files|"Update links on save" has an impact on whether or not this
field evaluates correctly

Peter Jamieson

"Compass Rose" wrote in message
...
I have a Word document that contains an imbedded Excel worksheet. One of
the
cells of the worksheet can have an either positive or negative value. I
have
some text in my document that has to be either "increased by" or
"reduced
by", depending on the value of the cell in the Excel worksheet.

Can that cell be referenced with a FIELD (or otherwise)?

TIA
David

P.S. If I have to, I can change the imbedded worksheet to a table with
formulas in it, and bookmark the cell of the table, but its not my
first
choice.








  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Referencing an imbedded Excel worksheet

It works here as long as Excel thinks the cell content is numeric. If it
thinks $(251.00) is a piece of text it won't work, at tleast partly because
Word just sees the text $(251.00) and either does not recognise that it is
negative (Word would need a minus sign and less clutter to do so, I think)
or does not recognise that it is a number at all.

So you either need to make sure your cell is formatted as a numeric or
currency value, or perhaps add a column (which you then hide) which applies
an Excel formula that ensures the result is numeric - and if you do that (I
have not tried) it might be easier to make the result of the formula the
exact text that you want in Word, and avoid having to use a \# switch.

The biggest problem I have had with this is definitely stability. Word
removes/modifies the file path name and the object reference in the LINK
field according to some "logic" that is not immediately apparent, but which
I have not been able to control.

Peter Jamieson
"Compass Rose" wrote in message
news
We're almost there! It works if the number is positive, but if the number
is
negative, I get the actual contents of the cell [eg $(251.00)]. There must
be
something wrong with the syntax, but I don't see what it is. Were you able
to
get it to work at your end?

David

"Peter Jamieson" wrote:


You should be able to use the numeric switch in the LINK field:

{ LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t \# " 'increased
by
'; 'reduced by ' "}

(A REF field has to refer to an existing /bookmark/.)

Peter Jamieson

"Compass Rose" wrote in message
...
Thanks, Peter. I'm running Word 2002, but I don't think that makes a
difference.

Expanding on your thinking, I tried this:
{Ref { LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }\# "
'increased
by '; 'reduced by ' "}
but got this:
Error! Reference source not found.

I'm stumped. Anybody else have a brain wave?

David


"Peter Jamieson" wrote:

In Word 2003, once you have embedded the Excel sheet, if you
a. select the cell
b. right-click, copy
c. in Word, Edit|Paste Special and choose Link and Unformatted text,
then
you should see a

link field along the lines of

{ LINK Excel.Sheet.8 "C:\\Documents and Settings\\me\\My
Documents\\embedded.doc" _1224002984!Sheet1!R3C2 \a \t }

When you update the embedded object, the link also updates, but
a. I have never used this technique in a production system
b. on my test system it was very slow, and I even saw a message or
dialog
box about Word wiating for an OLE operation to finish
c. I do not know what exactly the _1224002984 refers to, or in what
circumstances this reference ID might change. if you rename the
document
in
Windows Explorer, the link is unlikely to update correctly (you could
consider using an embedded field such as { FILENAME /p } instead but I
haven't tried).
d. you may find that the value of Word Tools|Options|General|Web
options|Files|"Update links on save" has an impact on whether or not
this
field evaluates correctly

Peter Jamieson

"Compass Rose" wrote in
message
...
I have a Word document that contains an imbedded Excel worksheet. One
of
the
cells of the worksheet can have an either positive or negative
value. I
have
some text in my document that has to be either "increased by" or
"reduced
by", depending on the value of the cell in the Excel worksheet.

Can that cell be referenced with a FIELD (or otherwise)?

TIA
David

P.S. If I have to, I can change the imbedded worksheet to a table
with
formulas in it, and bookmark the cell of the table, but its not my
first
choice.








Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing Word field contents in a linked Excel worksheet Sniper66 Microsoft Word Help 1 October 3rd 06 10:25 AM
Imbedded Excel files and Word Viewer d riley Microsoft Word Help 0 September 28th 06 10:21 PM
Excel worksheet font changes Jean Microsoft Word Help 1 September 22nd 05 05:46 AM
Display entire Excel worksheet in word doc Regor Microsoft Word Help 1 July 5th 05 07:11 PM
Excel worksheet in Word linked text boxes Eduardo Oliveira Page Layout 0 January 5th 05 11:23 PM


All times are GMT +1. The time now is 03:48 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"