Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Table in Word programming

Status
Not open for further replies.

edayers315

Technical User
Dec 20, 2011
1
US

The below reply by Macropod's was a post that has been closed.

I was hoping to get an answer to a couple questions on Macropod's reply.

1) what does the \a \p do or for?
2) I can not get this file location to work in the below script-
C:\Users\ayerse\Documents\A_CABOT\2011 SERVICE REPORTS
The sheet name is PROCEDURE_TABLE and the range name is PR.1_TBL

Any help would be great.

Happy Holidays to ALL!!!

Hi ProgEval,

It's easiest to change the linked range if you use named ranges in Excel. Then all you need to fo is change the range the name applies to.

Failing that, you can easily change the linked range from Within Word, by editing the field codes. To do this, select the linked Excel object in Word and press Shift-F9. You should see something like:
CODE
LINK Excel.Sheet.8 "C:\\My Documents\\My File.xls" "Sheet1!R1C1:R16C32" \a \p
All you need to do now is update the source range, then press F9 to refresh the link.

Cheers
 
The \a and \p are field switches used by the LINK field. There are other, too. For a full description, see: Which particular set of switches you get via Edit|Paste Special > paste link > etc, depends on which paste format you opt for.

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top