Macro difficulty in Word 97

J

Jack

I am not well versed in Word Basic.

I've been trying to create a new macro for the Normal template in Word 97 --
Replace Double Manual Line Breaks with Double Paragraph Marks =
ReplaceDblMLBwDblParaMarks.

I've actually done it -- but not like I want. That is, it works, but not
with the name I want for it.

Somehow, I wound up with the name "NewMacros.MAIN" -- which works only after
editing to eliminate any comment and description area of the macro. Here
it is:

Public Sub MAIN()
WordBasic.EditReplace Find:="^l^l", Replace:="^p^p", Direction:=0,
MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1,
Format:=0, Wrap:=2, FindAllWordForms:=0
End Sub

BUT, If I try to create a new macro with the name
"ReplaceDblMLBwDblParaMarks" Word Basic opens with

Public Sub MAIN()
WordBasic.EditReplace Find:="^l^l", Replace:="^p^p", Direction:=0,
MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1,
Format:=0, Wrap:=2, FindAllWordForms:=0
End Sub
_________________________________________

Sub ReplaceDblMLBwDblParaMarks()
'
' ReplaceDblMLBwDblParaMarks Macro
' Replace double manual line breaks with double paragraph marks
'

End Sub

AND THIS DOES NOT WORK FOR SOME REASON!!!


QUESTION # 1

How do I change the name from "NewMacros.MAIN" to
"ReplaceDblMLBwDblParaMarks"?


QUESTION # 2

Why does the macro which I created under the name
"ReplaceDblMLBwDblParaMarks" NOT work?


Jack
 
S

Suzanne S. Barnhill

Considering how little work it is to type ^l^l and ^p^p in the Find and
Replace dialog, I'm not sure why you even want a macro.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
J

Jack

Since you ask --

I subscribe to various news on-line, and I often like to print it out rather
than strain at the screen all the time, and I'd rather print it out in
columns which makes it easier to read. However, the email is too wide to
fit 2-columns-wide in Word. I could just print as is, but that uses more
paper than if I put it into two nice columns per page. What I have to do,
therefore, is first convert the ^l^l to ^p^p -- that keeps the real
paragraphs separated. Then I convert the ^l to " ", and that releases the
paragraphs to flow into the column size I designate. The ^l to " " macro
works fine, and is named the way I want it.

Jack



Considering how little work it is to type ^l^l and ^p^p in the Find and
Replace dialog, I'm not sure why you even want a macro.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
J

Jack

Well,

http://word.mvps.org/FAQs/General/DeleteParaMarksAtEndOfLines.htm is
essentially what I'm doing.

I would say, however, for efficiency it's hard to beat clicking on one macro
button then another!


Jack


See http://word.mvps.org/FAQs/Formatting/CleanWebText.htm or
http://word.mvps.org/FAQs/General/DeleteParaMarksAtEndOfLines.htm for a more
efficient approach.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
S

Suzanne S. Barnhill

There's no reason you can't create a macro to run either of the suggested
Replace operations, but you may not be able to *record* such a macro. For
help with *writing* macros, post in one of the word.vba NGs.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Graham Mayor

The freeware stripmail utility linked from the downloads page of my web site
does this in a one click operation.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jack

Very effective -- thanks!

Jack


The freeware stripmail utility linked from the downloads page of my web site
does this in a one click operation.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top