Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
ISay ISay is offline
external usenet poster
 
Posts: 15
Default Need Macro to remove empty paragraph marks.

I have tried the Macros that are supposed to remove empty paragraphs but they
don't work and I've used find/replace. The problem is that the document is
left with paragraph marks which Word 2003 does not see/recognize. I even
tried removing all paragraph marks and ended up with the following:

and white beans1. Heat 2 tbsp of the olive oil in a large heavy-¶
based pan over a medium heat. Add the shallots ¶
and garlic to the pan. Cook gently for 5 minutes ¶
until well softened. Halve the tomatoes and chop ¶
the tomato flesh into chunky pieces. Stir the ¶
tomatoes and bay leaves into the pan and crumble ¶
the dried chillies over.2. Stir in the beans and 100 ml water. Season with ¶

It seems the only way to remove them is manually, not an option.

I thought of creating a macro to go to the end of the line and backspace
over the mark and add a space if needed but I don't know how to loop a macro
to the end of the document.

I have searched for a "how to" for looping but they are all specific to the
problem under discussion and I don't know how to use the information for
using it as I would like to. Can you create a macro for me and explain
exactly how to use it? Also tell me how to create a loop within any macro so
I can use it however I need.

I was born a blond and have no idea of Visual Basic. I've tried editing
macros but only ended up corrupting them because I don't know how to do it.


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Need Macro to remove empty paragraph marks.

Hi ISay,

Ordinarily, Word expects a paragraph mark to consist of two characters - Hex OD & OA (ASCII 13 & 10). These constitute a carriage
return and line-feed pair. Sometimes, only the carriage return may be presnt, but Word will still display it as '¶'.

All you need to do to overcome this is to use '^13' in the 'Find' box and, if you want to replace it with a 'proper' paragraph
marker, '^p' in the 'Replace' box.

--
Cheers
macropod
[MVP - Microsoft Word]


"ISay" wrote in message ...
I have tried the Macros that are supposed to remove empty paragraphs but they
don't work and I've used find/replace. The problem is that the document is
left with paragraph marks which Word 2003 does not see/recognize. I even
tried removing all paragraph marks and ended up with the following:

and white beans1. Heat 2 tbsp of the olive oil in a large heavy-¶
based pan over a medium heat. Add the shallots ¶
and garlic to the pan. Cook gently for 5 minutes ¶
until well softened. Halve the tomatoes and chop ¶
the tomato flesh into chunky pieces. Stir the ¶
tomatoes and bay leaves into the pan and crumble ¶
the dried chillies over.2. Stir in the beans and 100 ml water. Season with ¶

It seems the only way to remove them is manually, not an option.

I thought of creating a macro to go to the end of the line and backspace
over the mark and add a space if needed but I don't know how to loop a macro
to the end of the document.

I have searched for a "how to" for looping but they are all specific to the
problem under discussion and I don't know how to use the information for
using it as I would like to. Can you create a macro for me and explain
exactly how to use it? Also tell me how to create a loop within any macro so
I can use it however I need.

I was born a blond and have no idea of Visual Basic. I've tried editing
macros but only ended up corrupting them because I don't know how to do it.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
ISay ISay is offline
external usenet poster
 
Posts: 15
Default Need Macro to remove empty paragraph marks.

This works up to a point. I'm still left with a paragraph mark/carriage
return at the end of every line so that I cannot justify the text. I can
highlight each paragraph then run a replace to remove paragraph marks within
that paragraph which is more trouble than it is worth. I need a macro for
doing this.

I would also like to know how to create a loop within a macro to continue to
the end of the document.


"macropod" wrote:

Hi ISay,

Ordinarily, Word expects a paragraph mark to consist of two characters - Hex OD & OA (ASCII 13 & 10). These constitute a carriage
return and line-feed pair. Sometimes, only the carriage return may be presnt, but Word will still display it as '¶'.

All you need to do to overcome this is to use '^13' in the 'Find' box and, if you want to replace it with a 'proper' paragraph
marker, '^p' in the 'Replace' box.

--
Cheers
macropod
[MVP - Microsoft Word]


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Need Macro to remove empty paragraph marks.

Hi ISay,

You can use the Find/Replace codes I posted on the whole document (or however much of it you still need to process) at once -
there's no need to process each paragraph individually.

I suggest using a 5-step process:
First, make sure there are two paragraph marks (either '^13' or '^p', it doesn't matter) between the 'real' paragraphs.
The next 4 steps are done sequentially and consist of replacing all instances of :
.. '^13' with '^p'
.. '^p^p' with '!~!'
.. '^p' with ' '
.. '!~!' with '^p' (or '^p^p' if you want to retain two paragraph marks between the 'real' paragraphs).
If you really want to use a macro, record one with the macro recorder - it's fairly efficient in this case. However, it'll take
longer to record than to go through the last 4 steps! And it won't help with ensuring the required initial separation between the
'real' paragraphs.

--
Cheers
macropod
[MVP - Microsoft Word]


"ISay" wrote in message ...
This works up to a point. I'm still left with a paragraph mark/carriage
return at the end of every line so that I cannot justify the text. I can
highlight each paragraph then run a replace to remove paragraph marks within
that paragraph which is more trouble than it is worth. I need a macro for
doing this.

I would also like to know how to create a loop within a macro to continue to
the end of the document.


"macropod" wrote:

Hi ISay,

Ordinarily, Word expects a paragraph mark to consist of two characters - Hex OD & OA (ASCII 13 & 10). These constitute a carriage
return and line-feed pair. Sometimes, only the carriage return may be presnt, but Word will still display it as '¶'.

All you need to do to overcome this is to use '^13' in the 'Find' box and, if you want to replace it with a 'proper' paragraph
marker, '^p' in the 'Replace' box.

--
Cheers
macropod
[MVP - Microsoft Word]



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
ISay ISay is offline
external usenet poster
 
Posts: 15
Default Need Macro to remove empty paragraph marks.

This did not work. I think the problem is in your first step; the 'real'
paragraphs do not have two ¶ marks. (I used copy/paste to collect recipes
from the internet, each site has its own way of doing things wrongly for easy
editing.) Every line ends with a ¶; some are followed by an empty line with
only ¶.

I copy the recipes into Notepad until such time as I get around to editing
to put them in my recipe software program. There are carriage returns at the
end of every line but no empty lines in Notepad. When I copy/paste the text
document into Word, I have the empty lines. Is there a solution?

"macropod" wrote:

Hi ISay,

You can use the Find/Replace codes I posted on the whole document (or however much of it you still need to process) at once -
there's no need to process each paragraph individually.

I suggest using a 5-step process:
First, make sure there are two paragraph marks (either '^13' or '^p', it doesn't matter) between the 'real' paragraphs.
The next 4 steps are done sequentially and consist of replacing all instances of :
.. '^13' with '^p'
.. '^p^p' with '!~!'
.. '^p' with ' '
.. '!~!' with '^p' (or '^p^p' if you want to retain two paragraph marks between the 'real' paragraphs).
If you really want to use a macro, record one with the macro recorder - it's fairly efficient in this case. However, it'll take
longer to record than to go through the last 4 steps! And it won't help with ensuring the required initial separation between the
'real' paragraphs.

--
Cheers
macropod
[MVP - Microsoft Word]




  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Need Macro to remove empty paragraph marks.

See http://word.mvps.org/FAQs/Formatting/CleanWebText.htm

If that doesn't fix it, send me a sample of the document that displays the
problem to the link on the home page of my web site so I can see what you
are dealing with.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



ISay wrote:
This did not work. I think the problem is in your first step; the
'real' paragraphs do not have two ¶ marks. (I used copy/paste to
collect recipes from the internet, each site has its own way of doing
things wrongly for easy editing.) Every line ends with a ¶; some
are followed by an empty line with only ¶.

I copy the recipes into Notepad until such time as I get around to
editing to put them in my recipe software program. There are
carriage returns at the end of every line but no empty lines in
Notepad. When I copy/paste the text document into Word, I have the
empty lines. Is there a solution?

"macropod" wrote:

Hi ISay,

You can use the Find/Replace codes I posted on the whole document
(or however much of it you still need to process) at once - there's
no need to process each paragraph individually.

I suggest using a 5-step process:
First, make sure there are two paragraph marks (either '^13' or
'^p', it doesn't matter) between the 'real' paragraphs.
The next 4 steps are done sequentially and consist of replacing all
instances of : .. '^13' with '^p'
.. '^p^p' with '!~!'
.. '^p' with ' '
.. '!~!' with '^p' (or '^p^p' if you want to retain two paragraph
marks between the 'real' paragraphs).
If you really want to use a macro, record one with the macro
recorder - it's fairly efficient in this case. However, it'll take
longer to record than to go through the last 4 steps! And it won't
help with ensuring the required initial separation between the
'real' paragraphs.

--
Cheers
macropod
[MVP - Microsoft Word]



  #7   Report Post  
Posted to microsoft.public.word.docmanagement
ISay ISay is offline
external usenet poster
 
Posts: 15
Default Need Macro to remove empty paragraph marks.

I have sent you two samples, before and after, to see what, if anything, you
can do. I have come to the conclusion that if I want to retain these recipes
I will have to manually edit them.

I keep a Notepad file iconized for saving recipes on the fly. When I have
the time/inclination, I open them in Word to edit them and add them to my
recipe software. That is where the problem lies, saving first to Notepad.
After experimenting, I can keep a WordPad file iconized and paste to that;
doing this, I do not lose the formatting which is creating the problems.

Thanks to you and macropod for trying to correct my problems.



"Graham Mayor" wrote:

See http://word.mvps.org/FAQs/Formatting/CleanWebText.htm

If that doesn't fix it, send me a sample of the document that displays the
problem to the link on the home page of my web site so I can see what you
are dealing with.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove crop marks or registration marks in word 2003? Steve B. Page Layout 2 February 27th 08 09:16 AM
Registry fix to remove margin marks or crop marks on page corners, courtesy of Jay Freedman Bob Wang Microsoft Word Help 1 February 5th 06 02:03 AM
How do I convert paragraph marks to new line marks? Peggy1959 Page Layout 4 January 20th 06 07:52 PM
How do I remove paragraph arrows and marks from document? Tom Page Layout 1 May 24th 05 03:16 AM
Paragraph marks how do I remove them from a word document? PaulSmith388 Microsoft Word Help 3 March 15th 05 11:33 PM


All times are GMT +1. The time now is 11:49 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"