I made a WORD 2000 template in which there are a few textfields that get
there information in cells of an excel file. Once the data is in the WORD
doc, this doc should live is own life without the Excel file.

In a manual way this is easy to perform: select all, edit, links, break link.

When I record these operations, the macro does not register these operations.
Neither does it in a template or a simple .doc file.

Does anyone know a solution? An appropriate VBA code is also OK!

Thanks a lot!

Patrick Paluselli

Re: How to break textlinks to Excel in WORD2000 by a macro or VBA? by Doug

Doug
Sun Jun 15 12:43:06 PDT 2008

Try:

Dim afield As Field
With ActiveDocument
For Each afield In .Fields
If afield.Type = wdFieldLink Then
afield.Unlink
End If
Next
End With


--
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

"Patrick Paluselli" <PatrickPaluselli@discussions.microsoft.com> wrote in
message news:B53986C4-AC88-423C-9ECC-131CF257BCC6@microsoft.com...
>I made a WORD 2000 template in which there are a few textfields that get
> there information in cells of an excel file. Once the data is in the WORD
> doc, this doc should live is own life without the Excel file.
>
> In a manual way this is easy to perform: select all, edit, links, break
> link.
>
> When I record these operations, the macro does not register these
> operations.
> Neither does it in a template or a simple .doc file.
>
> Does anyone know a solution? An appropriate VBA code is also OK!
>
> Thanks a lot!
>
> Patrick Paluselli



Re: How to break textlinks to Excel in WORD2000 by a macro or VBA? by PatrickPaluselli

PatrickPaluselli
Tue Jun 17 11:11:01 PDT 2008

Dear Mr.Robbins,

Your advice was very helpfull. It works as I wanted to. Thanks a lot !!!!

Patrick

"Doug Robbins - Word MVP" wrote:

> Try:
>
> Dim afield As Field
> With ActiveDocument
> For Each afield In .Fields
> If afield.Type = wdFieldLink Then
> afield.Unlink
> End If
> Next
> End With
>
>
> --
> 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
>
> "Patrick Paluselli" <PatrickPaluselli@discussions.microsoft.com> wrote in
> message news:B53986C4-AC88-423C-9ECC-131CF257BCC6@microsoft.com...
> >I made a WORD 2000 template in which there are a few textfields that get
> > there information in cells of an excel file. Once the data is in the WORD
> > doc, this doc should live is own life without the Excel file.
> >
> > In a manual way this is easy to perform: select all, edit, links, break
> > link.
> >
> > When I record these operations, the macro does not register these
> > operations.
> > Neither does it in a template or a simple .doc file.
> >
> > Does anyone know a solution? An appropriate VBA code is also OK!
> >
> > Thanks a lot!
> >
> > Patrick Paluselli
>
>
>