B
Bob
In a document-reformatting macro that basically works, I replace page breaks
with blank lines by using the following:
With Selection.Find
.Text = "^m"
.Replacement.Text = vbCrLf
(snip - other parameters removed for this note)
End With
Selection.Find.Execute Replace:=wdReplaceAll
This works well, except it inserts [NL] (Character10) (represented here by
an asterisk) at the beginning of the following line.
Original:
End of previous page text.
---Page Break---
Start of next page text...
After macro:
End of previous page text.
(Paragraph Symbol)
*Start of next page text...
I wrote a macro to display the ASCII code for the character; that's how I
found out it is the LineFeed character. On my computer, this character
looks like a blank space. On a colleague's computer, it is a box. In
either case, it kinda messes up the formatting.
Rewriting the macro to replace with vbCr works, but I'm still wondering why,
when using vbCrLf, the character "take up space". I've used vbCrLf before,
and it doesn't seem to put visible space in a line of text. Any ideas?
As a follow-on, is the paragraph symbol only Chr(13)? Doesn't this yield
odd results if I cut and paste into a text document?
Thanks,
Bob
with blank lines by using the following:
With Selection.Find
.Text = "^m"
.Replacement.Text = vbCrLf
(snip - other parameters removed for this note)
End With
Selection.Find.Execute Replace:=wdReplaceAll
This works well, except it inserts [NL] (Character10) (represented here by
an asterisk) at the beginning of the following line.
Original:
End of previous page text.
---Page Break---
Start of next page text...
After macro:
End of previous page text.
(Paragraph Symbol)
*Start of next page text...
I wrote a macro to display the ASCII code for the character; that's how I
found out it is the LineFeed character. On my computer, this character
looks like a blank space. On a colleague's computer, it is a box. In
either case, it kinda messes up the formatting.
Rewriting the macro to replace with vbCr works, but I'm still wondering why,
when using vbCrLf, the character "take up space". I've used vbCrLf before,
and it doesn't seem to put visible space in a line of text. Any ideas?
As a follow-on, is the paragraph symbol only Chr(13)? Doesn't this yield
odd results if I cut and paste into a text document?
Thanks,
Bob