S
StargateFan
Recording keystrokes is great for those of us who can never seem to
wrap our brains around vb <g>. I recorded this yesterday because I
ran into a RTF doct. that happened to be formatted with first-line
indenting. Didn't realize it until after running a text clean-up
macro and saw the indenting so added this in below to the cleanup
macro and it didn't work for the entire doct. Some of the first-line
indenting got left in.
Here's what I was left with after I trimmed out what I thought was not
needed from the recorded keys:
*********************************************************************************
Sub INDENTS_remove()
'
With Selection.ParagraphFormat
.Alignment = wdAlignParagraphLeft
.LeftIndent = InchesToPoints(0)
.RightIndent = InchesToPoints(0)
.SpaceBefore = 0
.SpaceAfter = 0
.LineSpacingRule = wdLineSpaceSingle
.FirstLineIndent = InchesToPoints(0)
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
End With
End Sub
*********************************************************************************
Since it leaves the odd one in, I know this isn't either complete or
completely right.
What's weird is that when I did the process again and recorded the
keystrokes once again, the new macro was virtually identical yet the
entire document was fixed. So I'm obviously missing something
somewhere.
Pls bear with me, I'm not very good at vb no matter how much I battle
with it. And the archives do mention how bad and incomplete recorded
keystrokes can be, it's just one has to start with something, eh?
Cheers. D
wrap our brains around vb <g>. I recorded this yesterday because I
ran into a RTF doct. that happened to be formatted with first-line
indenting. Didn't realize it until after running a text clean-up
macro and saw the indenting so added this in below to the cleanup
macro and it didn't work for the entire doct. Some of the first-line
indenting got left in.
Here's what I was left with after I trimmed out what I thought was not
needed from the recorded keys:
*********************************************************************************
Sub INDENTS_remove()
'
With Selection.ParagraphFormat
.Alignment = wdAlignParagraphLeft
.LeftIndent = InchesToPoints(0)
.RightIndent = InchesToPoints(0)
.SpaceBefore = 0
.SpaceAfter = 0
.LineSpacingRule = wdLineSpaceSingle
.FirstLineIndent = InchesToPoints(0)
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0
End With
End Sub
*********************************************************************************
Since it leaves the odd one in, I know this isn't either complete or
completely right.
What's weird is that when I did the process again and recorded the
keystrokes once again, the new macro was virtually identical yet the
entire document was fixed. So I'm obviously missing something
somewhere.
Pls bear with me, I'm not very good at vb no matter how much I battle
with it. And the archives do mention how bad and incomplete recorded
keystrokes can be, it's just one has to start with something, eh?
Cheers. D