Re: changing excel links from automatic to manual update by VBAbraham
VBAbraham
Wed Jul 16 19:33:01 PDT 2008
Thanks, Greg
It works perfectly, and so simple
I also fixed the problem by leaving the links in word alone and changing the
links in excel (coming from a DDE) to manual - the cursor in word kept
spinning otherwise
"Greg Maxey" wrote:
> On Jul 16, 11:36 am, VBAbraham <VBAbra...@discussions.microsoft.com>
> wrote:
> > well, that's the question: how do i programmatically change a given link to
> > excel from automatic updating to manual updating (the recorder doesn't catch
> > any of the key strokes)
>
> You might try:
>
> Sub ScratchMacro()
> Dim oFld As Word.Field
> Dim pStr As String
> For Each oFld In ActiveDocument.Range.Fields
> If oFld.Type = wdFieldLink Then
> pStr = oFld.Code.Text
> pStr = Replace(pStr, "\a", "")
> oFld.Code.Text = pStr
> pStr = ""
> End If
> Next oFld
> End Sub
>