View Single Post
  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Multiplicaion in a linked field

Use the following field construction

{ = { LINK Excel.Sheet.8 "D:\\uev\\Documents and
Settings\\bb\\Desktop\\file.xlsx" "Hybrid!R3C40" \a \t } * 100 }

Select your existing link, then use Ctrl+F9 to enclose it in a second pair
of field delimiters and then inser the = and the * 100 in the places as
shown above.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"peter petrelli" wrote in message ...
Hi macropod,

My word field code reads

{ LINK Excel.Sheet.8 "D:\\uev\\Documents and
Settings\\bb\\Desktop\\file.xlsx" "Hybrid!R3C40" \a \t }

I want to multiply 100 to this value. Can you please give me the code for
this? I am quite new to Field codes. Thanks!



macropod wrote:

Hi TishyMouse,Unfortunately, the approach you are after will not work as
any
19-Mar-10

Hi TishyMouse,

Unfortunately, the approach you are after will not work as any field
within a LINK field gets converted to its result the first time the
LINK field is updated. Consequently, you will need to use IF tests coded
along the lines of:
{IF{DOCPROPERTY Region}= "UK" {LINK Excel.Sheet.8
"\\\\domain.com\\mypath\\MyExcelFile.xls MySheet!Name_UK" \f 0 \p} {LINK
Excel.Sheet.8 "\\\\domain.com\\mypath\\MyExcelFile.xls MySheet!Name_US" \f
0 \p}}
or:
{IF{DOCPROPERTY Region}= "UK" {LINK Excel.Sheet.8
"\\\\domain.com\\mypath\\MyExcelFile.xls MySheet!Name_UK" \f 0 \p}}
{IF{DOCPROPERTY Region}= "US" {LINK Excel.Sheet.8
"\\\\domain.com\\mypath\\MyExcelFile.xls MySheet!Name_US" \f 0 \p}}

Note: The field brace pairs (ie '{ }') for the above example are created
via Ctrl-F9 - you cannot simply type them or copy & paste
them from this message. Note also the addition of the double quotes in the
LINK fields - their omission may have had something to do
with your field's failure.


--
Cheers
macropod
[Microsoft MVP - Word]

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
BizTalk Repeating Structures Table Looping and Table Extract
http://www.eggheadcafe.com/tutorials...g-structu.aspx