C
cjg.groups
Hello, I have the following code using a Selection, but is it possible
to use a Range?
I am using VBA to delete 32 unwanted blank lines before the text
"Table 11:" in a document. I can't use an absolute Range.Paragraph
reference because the amount of paragraphs above this point may vary.
Ideally, I would create a Range variable whose Start was "one line
after Tables(10)" and end was "one line before the text 'Table 11:'".
Is that a possible alternative?
With Selection.Find
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.Execute FindText:="Table 11:"
End With
With Selection
.Collapse
For i = 1 To 32
.TypeBackspace
Next i
.InsertBreak Type:=wdPageBreak
End With
And is there a way to return the selection to the top of the document
after this operation?
Thank you for your help?
to use a Range?
I am using VBA to delete 32 unwanted blank lines before the text
"Table 11:" in a document. I can't use an absolute Range.Paragraph
reference because the amount of paragraphs above this point may vary.
Ideally, I would create a Range variable whose Start was "one line
after Tables(10)" and end was "one line before the text 'Table 11:'".
Is that a possible alternative?
With Selection.Find
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.Execute FindText:="Table 11:"
End With
With Selection
.Collapse
For i = 1 To 32
.TypeBackspace
Next i
.InsertBreak Type:=wdPageBreak
End With
And is there a way to return the selection to the top of the document
after this operation?
Thank you for your help?