Spaces and Tabstops

W

WW

Hi,

I am pasting from different documents and after pasting, the tabbed
lists usually mess up. I found that this is becuase the source
documents are not properly created with uniform tabstops, instead
spaces or a combination of tabs and spaces were used. This causes a
lot of formatting to be redone.

Was thinking if there is a way, using vba, to scan the source
documents and replace the spaces with tabstops when appropriate
(tabstop value needs to read from that documents properties). This
way, when I copy&paste the documents, I dont have to redo any
formatting because of spaces.

Pls suggest with a vba solution.

Ciao
 
C

Cindy M -WordMVP-

Hi Ww,

Try experimenting with Word's Find/Replace (in the UI, first, then
you can put what works into VBA-speak). There's a ^w special code you
can use that finds "white space". The tricky part will be not
removing white space that's a single tab character. I often combine
^w with a space before or space after - you need to figure out what
works for you.
I am pasting from different documents and after pasting, the tabbed
lists usually mess up. I found that this is becuase the source
documents are not properly created with uniform tabstops, instead
spaces or a combination of tabs and spaces were used. This causes a
lot of formatting to be redone.

Was thinking if there is a way, using vba, to scan the source
documents and replace the spaces with tabstops when appropriate
(tabstop value needs to read from that documents properties). This
way, when I copy&paste the documents, I dont have to redo any
formatting because of spaces.

Pls suggest with a vba solution.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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