View Single Post
  #7   Report Post  
Posted to microsoft.public.word.vba.general,microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.word.vba.userforms
hornbecky83 hornbecky83 is offline
external usenet poster
 
Posts: 11
Default Link table from excel to word using word VBA

Thank you Cindy that helped alot! Thanks for sticking with me. I
wanted to ask you another question if you don't mind. Do you know how
to bookmark a link field. I want to add a bookmark to a table, but
everytime I update my table links, the bookmark goes away. It was
suggested to me to bookmark the link field, but I do not know how to do
this. Do you have any suggestions or know where to point me? Is there
another method you would suggest for maintaining the bookmark with a
table link updates? Thanks again for all you help.

Sarah

I had another question that related
Cindy M. wrote:
I tried doing what you said and that didn't seem to work. It wouldn't
accept the type:= Wapp.wdFieldEmpty so I replaced it with type:=
wdLinkTypeText. I tried several other versions and it still wouldn't
work. I was getting the same error. The other things I tried we
remove type argument, remove preserveformatting argument, remove both
type and preserveformatting argument, and remove range argument. The
last piece of code I tried was:

rng.Fields.Add Range:=Selection.Range, Type:=wdLinkTypeText, _
Text:="LINK Excel.Sheet.8 'C:\\Documents and
Settings\\shornbec\\Desktop\\sarah\\excel
templates\\Mission.FY07Q1_Sarah.xls' 'MissionTimelineDeltaVBudgetTable'
\a \f 4 \h \* MERGEFORMAT", PreserveFormatting:=True

If you include the Type argument, then you have to leave out the word
LINK in the Text argument. If you set PreserveFormatting:=True, then you
should leave \* MergeFormat out of the Text argument.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)