Thread: macros
View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default macros

You wouldn't - the macro recorder's limitations would not allow such a macro
to be recorded. However what you ask is simple enough. The following should
update only the Excel links. If you want to update all the fields (links are
fields) then use the sample code at
http://www.gmayor.com/installing_macro.htm

Sub UpdateExcelLinks()
With ActiveDocument
For i = .Fields.Count To 1 Step -1
With .Fields(i)
If .Type = wdFieldLink Then
If InStr(1, .Code, "Excel") 0 Then
.Update
End If
End If
End With
Next i
.Save
End With
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



cbcammarata wrote:
ok. So, do you know how I would go about recording this macro?

"CyberTaz" wrote:

Correct - that is expected behavior. The mouse is unusable in the
document while recording. Anything within the boundaries of the
Scroll Bars, Rulers & Status Bar are off limits. You must use the
Menu commands or keyboard equivalents. Likewise, the mouse can't be
used to navigate or select text while the recorder is active.

--
HTH |:)
Bob Jones
[MVP] Office:Mac

"cbcammarata" wrote in
message ...
I have several Excel-linked objects (tables) in my word document,
and want to
create a macro to update all objects at once. However, once I start
recording
the macro, it will not allow me to right click on the object to
"update link". Anyone know how to do this?