Hi

I have a txt document that has been opened in Word that has a series of
leading spaces.
These leading spaces (always seven of them) are scattered throughout the
document.
How do I remove these quickly.
Look forward to any assistance.
--
Regards
mg

Re: Remove Leading Spaces by fdde

fdde
Thu Aug 26 02:13:53 CDT 2004

why don't you just replace the seven spaces with nothing?
I just tried it and it works...
vince
"MG" <MG@discussions.microsoft.com> wrote in message
news:F54BAF07-AB5C-4A06-A9B3-43E55A204A47@microsoft.com...
> Hi
>
> I have a txt document that has been opened in Word that has a series of
> leading spaces.
> These leading spaces (always seven of them) are scattered throughout the
> document.
> How do I remove these quickly.
> Look forward to any assistance.
> --
> Regards
> mg



Re: Remove Leading Spaces by MG

MG
Thu Aug 26 02:43:04 CDT 2004

Hi

You are absolutely right. I tried this but used more complicated ways that
were unsuccessful. Must remember to look for the tree not the whole
forest!!!!!!

"fdde" wrote:

> why don't you just replace the seven spaces with nothing?
> I just tried it and it works...
> vince
> "MG" <MG@discussions.microsoft.com> wrote in message
> news:F54BAF07-AB5C-4A06-A9B3-43E55A204A47@microsoft.com...
> > Hi
> >
> > I have a txt document that has been opened in Word that has a series of
> > leading spaces.
> > These leading spaces (always seven of them) are scattered throughout the
> > document.
> > How do I remove these quickly.
> > Look forward to any assistance.
> > --
> > Regards
> > mg
>
>
>

Re: Remove Leading Spaces by Birgit

Birgit
Thu Aug 26 02:45:54 CDT 2004

Stefanie Krieger has recently posted code for search/replace in thread Soft
and Hard Return Chars and Paragraph Count. In your case this would be the
following:

With Selection.Find
.Text = " " '7 spaces
.Replacement.Text = "" 'empty string
.Forward = True
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With



"fdde" <sdsad@fsd.com> schreef :
> why don't you just replace the seven spaces with nothing?
> I just tried it and it works...
> vince
> "MG" <MG@discussions.microsoft.com> wrote in message
> news:F54BAF07-AB5C-4A06-A9B3-43E55A204A47@microsoft.com...
> > Hi
> >
> > I have a txt document that has been opened in Word that has a series of
> > leading spaces.
> > These leading spaces (always seven of them) are scattered throughout the
> > document.
> > How do I remove these quickly.
> > Look forward to any assistance.
> > --
> > Regards
> > mg
>
>



Re: Remove Leading Spaces by Klaus

Klaus
Thu Aug 26 03:53:43 CDT 2004

A trick that might come in handy in the future:
The probably quickest way to get rid of any number of leading or trailing
whitespace is to select everything, then center, then left-align.

If you are a keyboard junkie (like me):
Ctrl+A, Ctrl+E, Ctrl+L.

Regards,
Klaus


"MG" <MG@discussions.microsoft.com> wrote:
> Hi
>
> I have a txt document that has been opened in Word that has a
> series of leading spaces.
> These leading spaces (always seven of them) are scattered
> throughout the document.
> How do I remove these quickly.
> Look forward to any assistance.
> --
> Regards
> mg



Re: Remove Leading Spaces by JB

JB
Thu Aug 26 05:35:05 CDT 2004

MG wrote:
> Hi
>
> I have a txt document that has been opened in Word that has a series of
> leading spaces.
> These leading spaces (always seven of them) are scattered throughout the
> document.
> How do I remove these quickly.
> Look forward to any assistance.
If you wanted to code it for a macro button you could use something like
this. But it doesn't take into account the styles you have for these
paras...you'll have to do that part yourself (it's not that hard).

i = 0
For Each oPara In ActiveDocument.Paragraphs
ReDim Preserve Temp(i)
Temp(i) = Trim(oPara.Range.Text)
i = i + 1
Next
ActiveDocument.Range.Delete
For i = 0 To UBound(Temp())
ActiveDocument.Range.InsertAfter Temp(i)
Next


HTH

J

Re: Remove Leading Spaces by Jezebel

Jezebel
Thu Aug 26 07:42:14 CDT 2004

You can remove leading space from lines by searching for '^p ' and replacing
with '^p' (without the quotes). ^p is a paragraph mark. You can also use
^p^w to replace any amount of white space at the start of lines, but that
includes tab characters and you might have lines that are meant to start
with a tab.





"MG" <MG@discussions.microsoft.com> wrote in message
news:A9E5768B-2E52-4C65-8021-FAFF3A656F3B@microsoft.com...
> I have just noticed that a lot of the lines have one leading space at the
> beginning which I cannot use Find and Replace on, reason being is that it
> will also delete other single spaces between words.
> Any ideas on how to approach this.
>
> "MG" wrote:
>
> > Hi
> >
> > You are absolutely right. I tried this but used more complicated ways
that
> > were unsuccessful. Must remember to look for the tree not the whole
> > forest!!!!!!
> >
> > "fdde" wrote:
> >
> > > why don't you just replace the seven spaces with nothing?
> > > I just tried it and it works...
> > > vince
> > > "MG" <MG@discussions.microsoft.com> wrote in message
> > > news:F54BAF07-AB5C-4A06-A9B3-43E55A204A47@microsoft.com...
> > > > Hi
> > > >
> > > > I have a txt document that has been opened in Word that has a series
of
> > > > leading spaces.
> > > > These leading spaces (always seven of them) are scattered throughout
the
> > > > document.
> > > > How do I remove these quickly.
> > > > Look forward to any assistance.
> > > > --
> > > > Regards
> > > > mg
> > >
> > >
> > >