Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
Converting text to field codes
Hi,
Does anyone know if there is a way to convert text into field codes? John |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
Converting text to field codes
I don't know how much utility you can achieve with this, but I suppose
you could do it with a macro. Select the text and run: Sub Scratchmacro() Dim oRng As Word.Range Dim pText As String Set oRng = Selection.Range pText = oRng.Text oRng.Delete oRng.Fields.Add oRng, wdFieldEmpty, pText End Sub |
#3
Posted to microsoft.public.word.newusers
|
|||
|
|||
Converting text to field codes
Select the text.
Press Ctrl-F9 Press F9 The following does this after you've selected the text but I don't know that it is any easier to use than the function keys: Sub ChangeToField() ' ' Macro recorded 5/23/2006 by Charles Kyle Kenyon ' Selection.Fields.Add _ Range:=Selection.Range, _ Type:=wdFieldEmpty, _ PreserveFormatting:=False Selection.Fields.Update End Sub -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! My criminal defense site: http://addbalance.com --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "JohnA" wrote in message ... Hi, Does anyone know if there is a way to convert text into field codes? John |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Header with picture or text box | Page Layout | |||
cross reference field with space and colored text | Microsoft Word Help | |||
Enter text in a field and have it appear as entered elsewhere | Microsoft Word Help | |||
Numbers to appear at the cursor... | New Users | |||
help, problem with text field in word 2003 | Microsoft Word Help |