Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with Remove Hidden Data Tool | Microsoft Word Help | |||
Attaching Expansion Pack to Word Documents - Puzzling Problem | Microsoft Word Help | |||
How do I remove or supress blank data in fields in mail merge e.g. | Mailmerge | |||
Styles, text fields and protection problem. | Page Layout | |||
mail merge problem - "Word found locked fields during the update.. | Tables |