Hi
I have a table in word, and run a macro that inserts link fields in each cell of the table where the link field is to cells in excel.
the code that i am running inside a word document is the following
Dim j As Integer
For j = 1 To 5
Selection.MoveRight Unit:=wdCell
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"LINK Excel.Sheet.8 ""t:\erase.xls"" ""erase!r1c1"" \a", PreserveFormatting:= _
False
Next j
this code works just fine and inserts from excel into my word table.......but if you will notice, it always used the cell "r1c1"
i want it to use the loop i created and use the cell r1c & j...since the variable j iterates each in the loop.......
but the quotes and double quotes in the link excel.sheet.8 is confusing me and i do not know how to deal get the macro to use r1&ci in the presence of all these quotes??
any ideas?
I have a table in word, and run a macro that inserts link fields in each cell of the table where the link field is to cells in excel.
the code that i am running inside a word document is the following
Dim j As Integer
For j = 1 To 5
Selection.MoveRight Unit:=wdCell
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"LINK Excel.Sheet.8 ""t:\erase.xls"" ""erase!r1c1"" \a", PreserveFormatting:= _
False
Next j
this code works just fine and inserts from excel into my word table.......but if you will notice, it always used the cell "r1c1"
i want it to use the loop i created and use the cell r1c & j...since the variable j iterates each in the loop.......
but the quotes and double quotes in the link excel.sheet.8 is confusing me and i do not know how to deal get the macro to use r1&ci in the presence of all these quotes??
any ideas?