Prev: In Word my page keeps going small how do I get it back to normal?
Next: Why when I press delete do I also get a backslash symbol?
From: peter on 21 Mar 2010 23:04 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/aspnet/73bf7539-4c13-43a5-a580-a5704fe31a76/biztalk-repeating-structu.aspx
From: Doug Robbins - Word MVP on 22 Mar 2010 00:28
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 news:201032123359kiran.vmcs(a)gmail.com... > 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/aspnet/73bf7539-4c13-43a5-a580-a5704fe31a76/biztalk-repeating-structu.aspx |