Linking to a named range via a URL in a Word document

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to place a link to a table in an Excel sheet in my Word
document. I can do this successfully if the Excel file is saved locally or to
a network drive. However, if the target file is stored in Sharepoint I don't
be able to use the PlaceReference parameter in the LINK function.

i.e.
{ LINK Excel.Sheet.8 "D:\\anydirectory\\Myfile.xls" "MyNamedRange" } works
correctly

{ LINK Excel.Sheet.8 "http:////myportal//anydirectory//MyFile.xls"} does not
return an error, but I get the complete Excel sheet instead of the range.


{ LINK Excel.Sheet.8 "http:////myportal//mydirectory//MyFile.xls"
"MyNamedRange"} returns the following error:
"Could not open 'http://myportal/mydirectory/MyFile.xls!MyNamedRange"

Is there another syntax that might work for this?

TIA

TM
 
Note the exclamation mark in your third example...

You are sending TWO quoted strings, one for file name, one for range name.
I think it has to be a single quoted string with an exclamation point
delimiting the file name and range name. I'm guessing: I don't have
SharePoint here either...


I would like to place a link to a table in an Excel sheet in my Word
document. I can do this successfully if the Excel file is saved locally or to
a network drive. However, if the target file is stored in Sharepoint I don't
be able to use the PlaceReference parameter in the LINK function.

i.e.
{ LINK Excel.Sheet.8 "D:\\anydirectory\\Myfile.xls" "MyNamedRange" } works
correctly

{ LINK Excel.Sheet.8 "http:////myportal//anydirectory//MyFile.xls"} does not
return an error, but I get the complete Excel sheet instead of the range.


{ LINK Excel.Sheet.8 "http:////myportal//mydirectory//MyFile.xls"
"MyNamedRange"} returns the following error:
"Could not open 'http://myportal/mydirectory/MyFile.xls!MyNamedRange"

Is there another syntax that might work for this?

TIA

TM

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 
Thanks, both of you for the response (this forum is great!!!) Unfortunately
neither of the suggestions work. When I use the # notation, I don't get an
error but the whole of the worksheet is returned as per my original example 2
and when I Shift-F9 to look at the fields, Word has actually stripped off the
'#MyNamedRange' part.

When I try using the single quoted string with the ! delimiter I get exactly
the same error as example 3.

Note that Word provides the following worked example for LINK:
{ LINK Excel.Sheet.8 "C:\\My Documents\\Profits.xls" "Sheet1!R1C1:R4C4" \a
\p }
so the two quoted strings format is correct (and it works fine with example
1).

I think this may be more an issue with referencing named ranges in an
http://-style file reference rather than an issue in Word. But I'm not sure
where else to look for help...

John McGhie [MVP - Word and Word Macinto said:
Note the exclamation mark in your third example...

You are sending TWO quoted strings, one for file name, one for range name.
I think it has to be a single quoted string with an exclamation point
delimiting the file name and range name. I'm guessing: I don't have
SharePoint here either...


I would like to place a link to a table in an Excel sheet in my Word
document. I can do this successfully if the Excel file is saved locally or to
a network drive. However, if the target file is stored in Sharepoint I don't
be able to use the PlaceReference parameter in the LINK function.

i.e.
{ LINK Excel.Sheet.8 "D:\\anydirectory\\Myfile.xls" "MyNamedRange" } works
correctly

{ LINK Excel.Sheet.8 "http:////myportal//anydirectory//MyFile.xls"} does not
return an error, but I get the complete Excel sheet instead of the range.


{ LINK Excel.Sheet.8 "http:////myportal//mydirectory//MyFile.xls"
"MyNamedRange"} returns the following error:
"Could not open 'http://myportal/mydirectory/MyFile.xls!MyNamedRange"

Is there another syntax that might work for this?

TIA

TM

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 
Back
Top