Tab Size

A

anant

Hi All..

We are developing a macro that will help us do the following -

1. Search for tabs.
2. Replace a tab with the spaces.

However, we want to replace a tab of certain width with multiple space
of the same width. For example, if the width of the tab is 1 inch, the
we would like insert as many spaces as they would occupy for 1 inch o
space.

Please let me know if you have any suggestions on how this can b
accomplished.

Many thanks,
Anan
 
J

Jonathan West

Hi anant

This will be a very complex function, because you will need to take account
of the following.

- The position of each tab setting in the Word document
- What text has been included since the start of the line or the previous
tab
- The size and font of the text
- The width of the spaces that you are inserting, which also depend on the
size & type of the current font.

Take a step back, and describe what you are trying to achieve, and why. Then
we might be able to suggest a better approach.
 
A

anant

Jonathan,

Thank you for the reply. Here is what I am trying to achieve.

1. I've a set of Word documents formatted with Tabs.

2. I am using a database called askSam. askSam is a free-form databas
that lets you import Word, PDF, RTF and verious other formats into it
http://www.askSam.com

3. I am going to import these Word documents into askSam.

4. You can publish an askSam database on the web using askSam We
Publisher.

5. Web Publisher converts askSam records into HTML on the fly.

6. However, Tabs are not supported in HTML. Or I would say, tabs don'
get converted well when published on the web using askSam We
Publisher.

7. That's why I was trying to replace a tab with spaces.

8. The client I am dealing with is very picky about formatting. The
want to see web version of a document exactly as it was in Word.

I am using askSam because of its searching capability and ability t
deal with free-form text & formatted documents.

Hope this helps.
Anan
 
T

Tsu Dho Nimh

"The client I am dealing with is very picky about formatting. They wan
to see web version of a document exactly as it was in Word. "

They can't have what they want ... if the user has their font size se
differently in the browser than in the Word document, the document wil
look different. And if you use no-break spaces, the line spacing ca
make a strange-looking document.

The best way to ensure document appearance remains intact is to sav
the documents as PDF. If askSam can index and search PDFs, that's al
you need. Most browsers will be able to display the PDF
 

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