#1   Report Post  
Posted to microsoft.public.word.docmanagement
Little_Jimmy
 
Posts: n/a
Default tabs and spaces

I know how to replace all tabs with a general "something else"
edit--replace--more--special character--tab character...but how can I inform
Word that I want to insert 4 spaces when I tab???
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default tabs and spaces

Hi ?B?TGl0dGxlX0ppbW15?=,

I know how to replace all tabs with a general "something else"
edit--replace--more--special character--tab character...but how can I inform
Word that I want to insert 4 spaces when I tab???

You'd need to use a macro for this that remaps the TAB key. Here's some sample
code that makes the change in the current document, only. The first "Sub"
changes the Tab key mapping. The second "Sub" is the macro that will now be
called by pressing the TAB key (inserts the four spaces). The third macro will
turn off the Tab key mapping, restoring the original behavior.

If you don't know how what to do with these macros, you'll find a tutorial on
the word.mvps.org site on how to use macros people give you over the Internet.

Sub TabKeyInsertsSpaces()
Dim kb As Word.KeyBinding
Dim doc As Word.Document

Set doc = ActiveDocument
Application.CustomizationContext = doc
Set kb = Application.KeyBindings.Add( _
KeyCategory:=wdKeyCategoryMacro, _
Command:="TypeSpaces", _
KeyCode:=BuildKeyCode(wdKeyTab))
End Sub

Sub TypeSpaces()
Selection.Text = " "
Selection.Collapse wdCollapseEnd
End Sub

Sub ReleaseTabKey()
Dim doc As Word.Document

Set doc = ActiveDocument
CustomizationContext = doc
FindKey(BuildKeyCode(wdKeyTab)).Clear
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

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

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Little_Jimmy
 
Posts: n/a
Default tabs and spaces

do you mean
http://www.word.mvps.org/FAQs/Format...eanWebText.htm

"Cindy M -WordMVP-" wrote, among otherstuff:
If you don't know how what to do with these macros, you'll find a tutorial on
the word.mvps.org site on how to use macros people give you over the Internet.


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Little_Jimmy
 
Posts: n/a
Default tabs and spaces

thanks, Cindy.
It does as you said
  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill
 
Posts: n/a
Default tabs and spaces

No, she means http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm. You
might also see http://www.gmayor.com/installing_macro.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Little_Jimmy" wrote in message
...
do you mean
http://www.word.mvps.org/FAQs/Format...eanWebText.htm

"Cindy M -WordMVP-" wrote, among otherstuff:
If you don't know how what to do with these macros, you'll find a

tutorial on
the word.mvps.org site on how to use macros people give you over the

Internet.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up Tabs and Indentation to write programs in Word. Anand Formatting Long Documents 3 December 12th 05 08:51 PM
Tabs and Forms laughter33 Microsoft Word Help 6 October 20th 05 02:33 AM
The "Tab"s "enter"s and "space"s are shown as signs gizmo_lfiku Page Layout 4 July 6th 05 09:08 AM
How can I replace single spaces with double spaces in a docume TJ Microsoft Word Help 1 February 27th 05 04:22 AM
seeing symbols for tabs and spaces Kevin Microsoft Word Help 1 December 28th 04 03:30 PM


All times are GMT +1. The time now is 08:07 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"