Home |
Search |
Today's Posts |
#1
|
|||
|
|||
includetext field in word to import excel work sheet
I am creating a word mail merge where when a certain criteria is met, a named
sheet from an excel wookbook is imported. I have managed to get the workbook to import but i need to select which sheet each time. Is there any code I can enter in the if statement so that it automatically picks up a specific sheet when it meets the intended criteria? I'm on Microsoft Office 2003. Below is the if statement I am currently using. {IF { MERGEFIELD LeagueNumber } = 1 "{ INCLUDETEXT "c:\\leaguetable.xls" }" "{ AUTOTEXT Copyright }"} |
#2
|
|||
|
|||
Use something like
{LINK Excel.Sheet.8 "C:\\Access\\tblEvaporatorLoads.xls" "tblEvaporatorLoads!R1C1:R87C4" } -- 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 "MandyK" wrote in message ... I am creating a word mail merge where when a certain criteria is met, a named sheet from an excel wookbook is imported. I have managed to get the workbook to import but i need to select which sheet each time. Is there any code I can enter in the if statement so that it automatically picks up a specific sheet when it meets the intended criteria? I'm on Microsoft Office 2003. Below is the if statement I am currently using. {IF { MERGEFIELD LeagueNumber } = 1 "{ INCLUDETEXT "c:\\leaguetable.xls" }" "{ AUTOTEXT Copyright }"} |
#3
|
|||
|
|||
Thanks, this worked!
Kind regards, MandyK "Doug Robbins" wrote: Use something like {LINK Excel.Sheet.8 "C:\\Access\\tblEvaporatorLoads.xls" "tblEvaporatorLoads!R1C1:R87C4" } -- 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 "MandyK" wrote in message ... I am creating a word mail merge where when a certain criteria is met, a named sheet from an excel wookbook is imported. I have managed to get the workbook to import but i need to select which sheet each time. Is there any code I can enter in the if statement so that it automatically picks up a specific sheet when it meets the intended criteria? I'm on Microsoft Office 2003. Below is the if statement I am currently using. {IF { MERGEFIELD LeagueNumber } = 1 "{ INCLUDETEXT "c:\\leaguetable.xls" }" "{ AUTOTEXT Copyright }"} |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Please give us REVEAL CODES like WORD PERFECT not reveal codes in. | Microsoft Word Help | |||
Making Word do something that Wordperfect can do | New Users | |||
Macros - Keyboard Commands | Microsoft Word Help | |||
word xp crashes after macros are recorded | Microsoft Word Help | |||
WP Delay Code - Word Equiv | Microsoft Word Help |