find and replace with backspace

J

Juan

Hi everyone,

i have a macro that searches and replaces through the body of a document. In
some cases, I use ^p to insert a paragraph, but sometimes, what I need is to
insert a backspace. Is there a way to insert a backspace without using
Selection.TypeBackspace? I am looking for something like ^p for paragraph,
^l for lines...

Thanks, from Spain

Juan Magaña
 
J

Juan

Ok, I think I found a workaround: in those cases, instead of searching for
the text and replace it with a backspace, which I don´t know how to do, I
search for ^pTEXT and replace by "". It works.
 
H

Helmut Weber

Hi Juan,
Backspace is chr$(8).
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, NT4.0
 
J

JGM

Hi Helmut,

How do you do a find/replace with the replacement being Chr(8) and having it
act as a real backspace?
If you do a regular find/replace, you end up with square in the document...
I was under the impression that Juan wanted do a "real backspace" in his
find/replce... I would like to know how you achieve that with the Chr(8)
ASCII code?

Curious
TIA
 
H

Helmut Weber

Hi Jean-Guy,
sorry to all of you,
didn't read the original posting carefully enough.
Thanks for correction.
Helmut Weber
 

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