Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
How do I record keystrokes and then evoke a command to repeat those
keystrokes? For instances; I want to change the first word in a numbered list in the document all the way through the document. |
#2
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
You cannot record loops with the macro recorder.
The following will replace the first word in each paragraph in the selected text with the word(s) defines in sText Sub ReplaceFirstWord() Dim oPara As Paragraph Dim sText As String sText = "Replacement Text" For Each oPara In Selection.Range.Paragraphs oPara.Range.Words(1).Text = sText & Chr(32) Next oPara End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Greek Dunigan" wrote in message m... How do I record keystrokes and then evoke a command to repeat those keystrokes? For instances; I want to change the first word in a numbered list in the document all the way through the document. |
#3
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
See also http://www.gmayor.com/installing_macro.htm
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Graham Mayor" wrote in message ... You cannot record loops with the macro recorder. The following will replace the first word in each paragraph in the selected text with the word(s) defines in sText Sub ReplaceFirstWord() Dim oPara As Paragraph Dim sText As String sText = "Replacement Text" For Each oPara In Selection.Range.Paragraphs oPara.Range.Words(1).Text = sText & Chr(32) Next oPara End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Greek Dunigan" wrote in message m... How do I record keystrokes and then evoke a command to repeat those keystrokes? For instances; I want to change the first word in a numbered list in the document all the way through the document. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delay in keystrokes | Microsoft Word Help | |||
Recording Changes to Changes | Microsoft Word Help | |||
Recording and Displaying Word Keystrokes | Microsoft Word Help | |||
Recording a Macro | Microsoft Word Help | |||
Need two keystrokes to use " or ' | Microsoft Word Help |