Reply
 
Thread Tools Display Modes
  #1   Report Post  
KAM
 
Posts: n/a
Default Remove fields problem with Equations

I am working with Word 2000.

I receive documents that contain field codes, hyperlinks and equations (done
in MathType). I need to make all the field codes straight text (this includes
the auto numbering that can be added to equations through MathType).

I select the entire doc (ctrl-a) and then apply ctrl-shift-F9 to "remove"
the field codes.
Once this is done, all the equations turn to graphics. This is a problem for
continuing to work with the equations in the file.

What is interesting is that Microsoft Help lists the following for
ctrl-shift F9:
Convert embedded objects into graphics: Press CTRL+SHIFT+F9.
Unlink a field: CTRL+SHIFT+F9.

Is there another way to unlink the fields? Going through and finding and
unlinking them one-by-one is not an option as there are sometimes too many
fields within a file to be unlinked one-by-one.

Thanks!
  #2   Report Post  
Greg Maxey
 
Posts: n/a
Default

KAM,

You might try this macro:

Sub UnlinkAllFields()
Dim pRange As Word.Range
For Each pRange In ActiveDocument.StoryRanges
Do
pRange.Fields.Unlink
Set pRange = pRange.NextStoryRange
Loop Until pRange Is Nothing
Next
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

KAM wrote:
I am working with Word 2000.

I receive documents that contain field codes, hyperlinks and
equations (done in MathType). I need to make all the field codes
straight text (this includes the auto numbering that can be added to
equations through MathType).

I select the entire doc (ctrl-a) and then apply ctrl-shift-F9 to
"remove" the field codes.
Once this is done, all the equations turn to graphics. This is a
problem for continuing to work with the equations in the file.

What is interesting is that Microsoft Help lists the following for
ctrl-shift F9:
Convert embedded objects into graphics: Press CTRL+SHIFT+F9.
Unlink a field: CTRL+SHIFT+F9.

Is there another way to unlink the fields? Going through and finding
and unlinking them one-by-one is not an option as there are sometimes
too many fields within a file to be unlinked one-by-one.

Thanks!



  #3   Report Post  
KAM
 
Posts: n/a
Default

Thanks for the quick response!
I tried it and it removed the fields, but it also converted the Equations to
graphics.

BUT here is the difference:

Using Ctrl-Shift-F9, I cannot recover the equations using Convert
Equations...OLE objects from MathType (using WORD 2000 only)

Using your macro allows for me to be able to run the Convert Equations...to
OLE objects and it converted them back to Mathtype.

Any other ideas so that I would not have to run the Convert Equations
piece...?
(I am putting something in place in our workflow that would require my users
to run the Convert Equations to OLE anyway, but I am not sure WHEN we would
run that and I cannot be sure that my users would run it again AFTER the
field cleanup.) I could also put the code to Convert Equations to OLE right
into the Unlink Fields module, but the Convert Equations can be quite time
consuming. We can get files with 100 or so equations.

Any other thoughts would be greatly appreciated.

Thanks!
Kathleen


"Greg Maxey" wrote:

KAM,

You might try this macro:

Sub UnlinkAllFields()
Dim pRange As Word.Range
For Each pRange In ActiveDocument.StoryRanges
Do
pRange.Fields.Unlink
Set pRange = pRange.NextStoryRange
Loop Until pRange Is Nothing
Next
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

KAM wrote:
I am working with Word 2000.

I receive documents that contain field codes, hyperlinks and
equations (done in MathType). I need to make all the field codes
straight text (this includes the auto numbering that can be added to
equations through MathType).

I select the entire doc (ctrl-a) and then apply ctrl-shift-F9 to
"remove" the field codes.
Once this is done, all the equations turn to graphics. This is a
problem for continuing to work with the equations in the file.

What is interesting is that Microsoft Help lists the following for
ctrl-shift F9:
Convert embedded objects into graphics: Press CTRL+SHIFT+F9.
Unlink a field: CTRL+SHIFT+F9.

Is there another way to unlink the fields? Going through and finding
and unlinking them one-by-one is not an option as there are sometimes
too many fields within a file to be unlinked one-by-one.

Thanks!




  #4   Report Post  
Greg Maxey
 
Posts: n/a
Default

Kathleen,

I am not sure I understand your question so please excuse me if my propose
solution is out to lunch.

I think you want to unlink field and leave fields of the the type { EMBED
...... } along. It will be slower, but maybe something like:
Sub UnlinkSomeFields()
Dim pRange As Word.Range
Dim oField As Field
For Each pRange In ActiveDocument.StoryRanges
Do
For Each oField In pRange.Fields
If Not InStr(oField.Code.Text, "EMBED") 0 Then
oField.Unlink
End If
Next
Set pRange = pRange.NextStoryRange
Loop Until pRange Is Nothing
Next
End Sub

Which should only unlink fields that "don't" have EMBED in the
field.code.text

HTH

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

KAM wrote:
Thanks for the quick response!
I tried it and it removed the fields, but it also converted the
Equations to graphics.

BUT here is the difference:

Using Ctrl-Shift-F9, I cannot recover the equations using Convert
Equations...OLE objects from MathType (using WORD 2000 only)

Using your macro allows for me to be able to run the Convert
Equations...to OLE objects and it converted them back to Mathtype.

Any other ideas so that I would not have to run the Convert Equations
piece...?
(I am putting something in place in our workflow that would require
my users to run the Convert Equations to OLE anyway, but I am not
sure WHEN we would run that and I cannot be sure that my users would
run it again AFTER the field cleanup.) I could also put the code to
Convert Equations to OLE right into the Unlink Fields module, but the
Convert Equations can be quite time consuming. We can get files with
100 or so equations.

Any other thoughts would be greatly appreciated.

Thanks!
Kathleen


"Greg Maxey" wrote:

KAM,

You might try this macro:

Sub UnlinkAllFields()
Dim pRange As Word.Range
For Each pRange In ActiveDocument.StoryRanges
Do
pRange.Fields.Unlink
Set pRange = pRange.NextStoryRange
Loop Until pRange Is Nothing
Next
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

KAM wrote:
I am working with Word 2000.

I receive documents that contain field codes, hyperlinks and
equations (done in MathType). I need to make all the field codes
straight text (this includes the auto numbering that can be added to
equations through MathType).

I select the entire doc (ctrl-a) and then apply ctrl-shift-F9 to
"remove" the field codes.
Once this is done, all the equations turn to graphics. This is a
problem for continuing to work with the equations in the file.

What is interesting is that Microsoft Help lists the following for
ctrl-shift F9:
Convert embedded objects into graphics: Press CTRL+SHIFT+F9.
Unlink a field: CTRL+SHIFT+F9.

Is there another way to unlink the fields? Going through and finding
and unlinking them one-by-one is not an option as there are
sometimes too many fields within a file to be unlinked one-by-one.

Thanks!



  #5   Report Post  
KAM
 
Posts: n/a
Default

YES! Excellent. On a quick try it seemed to do the trick.

I wanted to unlink all other fields - but did not want to touch the
equations (we still need to edit them in MathType). Back when I started
working on this, I was confused by the fact that Word saw the Equations as
fields, when I didn't see them that way. In fact, that really wasn't the
case, but I could not figure out how to differentiate them.

Thanks so much!
Kathleen

"Greg Maxey" wrote:

Kathleen,

I am not sure I understand your question so please excuse me if my propose
solution is out to lunch.

I think you want to unlink field and leave fields of the the type { EMBED
...... } along. It will be slower, but maybe something like:
Sub UnlinkSomeFields()
Dim pRange As Word.Range
Dim oField As Field
For Each pRange In ActiveDocument.StoryRanges
Do
For Each oField In pRange.Fields
If Not InStr(oField.Code.Text, "EMBED") 0 Then
oField.Unlink
End If
Next
Set pRange = pRange.NextStoryRange
Loop Until pRange Is Nothing
Next
End Sub

Which should only unlink fields that "don't" have EMBED in the
field.code.text

HTH

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

KAM wrote:
Thanks for the quick response!
I tried it and it removed the fields, but it also converted the
Equations to graphics.

BUT here is the difference:

Using Ctrl-Shift-F9, I cannot recover the equations using Convert
Equations...OLE objects from MathType (using WORD 2000 only)

Using your macro allows for me to be able to run the Convert
Equations...to OLE objects and it converted them back to Mathtype.

Any other ideas so that I would not have to run the Convert Equations
piece...?
(I am putting something in place in our workflow that would require
my users to run the Convert Equations to OLE anyway, but I am not
sure WHEN we would run that and I cannot be sure that my users would
run it again AFTER the field cleanup.) I could also put the code to
Convert Equations to OLE right into the Unlink Fields module, but the
Convert Equations can be quite time consuming. We can get files with
100 or so equations.

Any other thoughts would be greatly appreciated.

Thanks!
Kathleen


"Greg Maxey" wrote:

KAM,

You might try this macro:

Sub UnlinkAllFields()
Dim pRange As Word.Range
For Each pRange In ActiveDocument.StoryRanges
Do
pRange.Fields.Unlink
Set pRange = pRange.NextStoryRange
Loop Until pRange Is Nothing
Next
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

KAM wrote:
I am working with Word 2000.

I receive documents that contain field codes, hyperlinks and
equations (done in MathType). I need to make all the field codes
straight text (this includes the auto numbering that can be added to
equations through MathType).

I select the entire doc (ctrl-a) and then apply ctrl-shift-F9 to
"remove" the field codes.
Once this is done, all the equations turn to graphics. This is a
problem for continuing to work with the equations in the file.

What is interesting is that Microsoft Help lists the following for
ctrl-shift F9:
Convert embedded objects into graphics: Press CTRL+SHIFT+F9.
Unlink a field: CTRL+SHIFT+F9.

Is there another way to unlink the fields? Going through and finding
and unlinking them one-by-one is not an option as there are
sometimes too many fields within a file to be unlinked one-by-one.

Thanks!




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Remove Hidden Data Tool Owen Gray Microsoft Word Help 2 April 25th 05 09:28 PM
Attaching Expansion Pack to Word Documents - Puzzling Problem Jose Microsoft Word Help 1 March 3rd 05 10:14 AM
How do I remove or supress blank data in fields in mail merge e.g. J&L Mailmerge 2 January 14th 05 06:04 AM
Styles, text fields and protection problem. AnttiK Page Layout 8 January 10th 05 08:15 PM
mail merge problem - "Word found locked fields during the update.. zgaryt Tables 1 January 9th 05 01:04 PM


All times are GMT +1. The time now is 05:15 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"