Re: Remove spaces (Hard-returns) at top of pages
- From: "Tony Jollans" <My Forename at My Surname dot com>
- Date: Tue, 28 Mar 2006 21:23:02 +0100
Hi Ant,
If you work with Word it will repay your effort but if you work against it
you will forever have problems. If Suzanne's post doesn't push you in the
right direction, do come back.
--
Enjoy,
Tony
"Ant (antonfh_at_gmail_dot_com)"
<Antantonfhatgmaildotcom@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EDC9F413-E154-40FF-B58D-C0D734C90475@xxxxxxxxxxxxxxxx
Yes, I know your frustration now, me trying to convey the problem, youtrying
to try and make out what on earth I am on about.word,
Why cant it be as simple as some script that checks each page, removes all
ASCI code for line breaks until it finds a text string and then goes on to
the next page, sounds so simple, but alas I have no clue of doing VB in
or writing any other script (so for me it is 100% impossible) other thanto
come up with the concept.not
Go and have fun with the family, Im on my way home too, will check tomrow
morning again (so that gives you over 12 hours before I am back again)
I have used some styles to some extend, but still (Also note here - I am
trying to remove extra spaces, the thing is the paragraph might end juston
the last line of the page, on the next page it should by all means add aline
break to go into the next parag. or point, but now there is Lecturers whoif
demand that each page must start without that bloody space) ... maybe they
just want to be difficult?
Thanks Tony, Im trying to figure out your code you send first time to see
I can get it to check each page... and obviously I am not getting anywhere;-)
a
Anton
"Tony Jollans" wrote:
Hmmm - the first will remove - completely remove - multiple consecutive
occurrences of (either space or paragraph mark) so a paragraph ending in
sortspace will get cleared. This is one of the difficulties of doing this
Stylesof thing remotely :)
Now I understand what you are trying to do, the real answer is to use
outwith the formatting you want in the first place instead of trying to lay
willyour document with extra spaces and lines. A well formatted document
ofnever have extra spaces and paragraph marks anywhere and the proper use
needed.styles will make it easier to work with as well and no reformatting
than
I have to go out now - I'm afraid my family are more important to me
threeyou are :) - but if nobody else jumps in I will post back in, maybe,
removehours.
--
Enjoy,
Tony
"Ant (antonfh_at_gmail_dot_com)"
<Antantonfhatgmaildotcom@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FE0A4D57-72EB-4C3F-AB8E-CCE9EEA6817A@xxxxxxxxxxxxxxxx
Tony Jolians.worked
First of thank you for your time and assistance.
Ok I tried the find and replace, the first one with the replace of \1
in a way, but it took away some hard-returns, resulting in one bigparagraph
for example, the other one with the replace of \1\2 did not seem to
page ofthe line breaks at top of pages.only
The piece of code you send first time actually worked like a charm, if
on the first page of the document, if that code could run for each
andthe document that would be the ideal situation.
You see the thing with this is that this is a project for a assignment
topthe lecturers are very specific that they dont allow any space at the
pageof
the page (now I ask you with tears in my eyes, how are you supposed to
reformat your document each time and take out spaces at the top of a
thewithout using some script ?)
Thank you for your help.
Anton
"Tony Jollans" wrote:
Unless you have hard page breaks all over the place then what is at
pagetop
of page 2, say, will change when you delete content from the top of
you1 -
so doing this by page doesn't really make sense.
If you want to replace ALL multiple instances of spaces and returns
leftcould use a Find and Replace of ---
Find [^13 ]{2,}([!^13 ]) - if I've typed correctly that should be
brace,(square) bracket, caret, one, three, space, right bracket, left
mark,two,
comma, right brace, left parenthesis, left bracket, exclamation
bycaret,
spacesone, three, space, right bracket, right parenthesis.
Replace \1 - that's backslash, one
Check Use Wildcards and hit Replace All
If you do have manual page breaks then you can search for multiple
following them with ---
Find string of (^m)[^13 ]{1,}([!^13 ]) - that's as above preceded
theleft
parenthesis, caret, lower case letter em, right parenthesis and with
find atwo
have 7inside the braces replaced with a one.
And a Replace string of \1\2
Please come back if it's something differeent.
--
Enjoy,
Tony
"Ant (antonfh_at_gmail_dot_com)"
<Antantonfhatgmaildotcom@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AA03B86C-B7DD-4A23-AFD2-868063815D19@xxxxxxxxxxxxxxxx
Tony.
No no, not the top of the document, at the top of certain pages, I
documents, some with over 500 pages, so for me to go and try to
thatspace
(or more) at the top of a page and deleting them by hand is not
andeasy,
and then someone changes the document and I have to do a search
atfind
spacesall
over again to make sure each page of the 500 page document has no
at
the top ...thats where the problem comes in.
Thanks for the code, going to try it now.
Anton
"Tony Jollans" wrote:
I don't see why you 'obviously' have lots of spaces and returns
notthe
start
of a document - but if that's all you want to get rid of you're
anddocumentgoing to
find anything a whole lot easier than going to the top of the
and
doing it manually
I just did a search for the first non-space non-paragraph mark
inrecorded
this if it helps ...
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 28/03/2006 by Tony
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[!^13 ]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.HomeKey Unit:=wdStory, Extend:=wdExtend
Selection.TypeBackspace
End Sub
--
Enjoy,
Tony
"Ant (antonfh_at_gmail_dot_com)"
<Ant(antonfh_at_gmail_dot_com)@discussions.microsoft.com> wrote
topmessage
news:A10E3648-7239-4F4A-B280-76712D9AACA2@xxxxxxxxxxxxxxxx
How can I remove all spaces (lines) aka? Hard-returns at the
breaksof a
editing apage
in
my document, is there a macro I can do this with.
It should be something to write as "clean-up-process" after
result indoc,
since any editing would move text around again and obviously
some
spaces at the top of a doc.
I tried to look for some examples but most removes all line
firstor
theseshard-returns, I am looking only for something that will find
spaces
(breaks) at the top of the page and remove them up to the
line
of
text
on that page.
Hope this makes sense
.
- References:
- Re: Remove spaces (Hard-returns) at top of pages
- From: Tony Jollans
- Re: Remove spaces (Hard-returns) at top of pages
- From: Ant(antonfh_at_gmail_dot_com)
- Re: Remove spaces (Hard-returns) at top of pages
- From: Tony Jollans
- Re: Remove spaces (Hard-returns) at top of pages
- From: Ant(antonfh_at_gmail_dot_com)
- Re: Remove spaces (Hard-returns) at top of pages
- From: Tony Jollans
- Re: Remove spaces (Hard-returns) at top of pages
- From: Ant(antonfh_at_gmail_dot_com)
- Re: Remove spaces (Hard-returns) at top of pages
- Prev by Date: Re: Why did hitler have so much support from his country?
- Next by Date: Re: word 97 compared to word 2003 html format
- Previous by thread: Re: Remove spaces (Hard-returns) at top of pages
- Next by thread: Re: Remove spaces (Hard-returns) at top of pages
- Index(es):
Relevant Pages
|