how to set Field update setting to Manual

  • Thread starter musicgold via OfficeKB.com
  • Start date
M

musicgold via OfficeKB.com

Hi All,

I am trying to use VBA to set the links in a Word doc to the Manual Update
setting.
I copy a table ( linked to another Excel doc) in this word doc and want to
set the fields to update only when I right click on the table and hit 'Update
link'. I not able to get my macro set the radio button in front of the Manual
update field. The code is given below. Please give some suggestions. Thanks.
MG.

Public Sub UpdateAllLinks()

' to make all links in the word document update only manually

Dim oFld As Word.Field

For Each oFld In ActiveDocument.Fields
If oFld.Type = wdFieldLink Then

With oFld
'.Locked = True ' this line locks the field. I can not manually update the
field.

End With

End If
Next
End Sub
 
D

Doug Robbins - Word MVP

Maybe this will do what you want:

Application.Options.UpdateLinksAtOpen = False

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

musicgold via OfficeKB.com

Doug,

Thanks. However setting that option will affect the whole workbook.
I am trying to set the manual update option only for the fields linked to an
Excel file.


Maybe this will do what you want:

Application.Options.UpdateLinksAtOpen = False
[quoted text clipped - 28 lines]
Next
End Sub
 
S

Stefan Blom

Have you tried to *lock* the individual field, using Ctrl+F11 (you can then
use Ctrl+Shift+F11 to unlock the field).

Note that not all fields supports locking, though. For example, EMBED fields
do not.

--
Stefan Blom
Microsoft Word MVP


Doug,

Thanks. However setting that option will affect the whole workbook.
I am trying to set the manual update option only for the fields linked to
an
Excel file.


Maybe this will do what you want:

Application.Options.UpdateLinksAtOpen = False
[quoted text clipped - 28 lines]
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top