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