Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
Rick[_4_] Rick[_4_] is offline
external usenet poster
 
Posts: 25
Default insert tab stop from this point forward

I have text in my document below where my cursor is. How do I create
a tab stop that will be set for the rest of the document forward? I
know if I just enter a tab stop normally, it won't be in effect for
any text below my cursor position. Thanks.
  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default insert tab stop from this point forward

Rick wrote:
I have text in my document below where my cursor is. How do I create
a tab stop that will be set for the rest of the document forward? I
know if I just enter a tab stop normally, it won't be in effect for
any text below my cursor position. Thanks.


Select all of the text where you want the tab stop to be set (most easily by
pressing Ctrl+Shift+End) and then set the tab stop.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


  #3   Report Post  
Posted to microsoft.public.word.pagelayout
Rick[_4_] Rick[_4_] is offline
external usenet poster
 
Posts: 25
Default insert tab stop from this point forward

Thanks; that does it. Is there an easy way to then return to where I
was before pressing Ctrl+Shift+End?

On May 19, 4:45*pm, "Jay Freedman" wrote:
Rick wrote:
I have text in my document below where my cursor is. *How do I create
a tab stop that will be set for the rest of the document forward? *I
know if I just enter a tab stop normally, it won't be in effect for
any text below my cursor position. *Thanks.


Select all of the text where you want the tab stop to be set (most easily by
pressing Ctrl+Shift+End) and then set the tab stop.

--
Regards,
Jay Freedman
Microsoft Word MVP * * * *FAQ:http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


  #4   Report Post  
Posted to microsoft.public.word.pagelayout
Rick[_4_] Rick[_4_] is offline
external usenet poster
 
Posts: 25
Default insert tab stop from this point forward

Sorry -- I really meant to ask how to do this in VBA code -- should
have posted in the VBA forum...

On May 22, 4:00*pm, Rick wrote:
Thanks; that does it. *Is there an easy way to then return to where I
was before pressing Ctrl+Shift+End?

On May 19, 4:45*pm, "Jay Freedman" wrote:



Rick wrote:
I have text in my document below where my cursor is. *How do I create
a tab stop that will be set for the rest of the document forward? *I
know if I just enter a tab stop normally, it won't be in effect for
any text below my cursor position. *Thanks.


Select all of the text where you want the tab stop to be set (most easily by
pressing Ctrl+Shift+End) and then set the tab stop.


--
Regards,
Jay Freedman
Microsoft Word MVP * * * *FAQ:http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.- Hide quoted text -


- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.word.pagelayout
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default insert tab stop from this point forward

This is kind of clumsy about getting the tab stop position, and you could
also ask the user for the alignment and leader type, but you get the idea...

Sub SetTabStopToEndOfDoc()
Dim strStop As String
Dim nStop As Single
Dim oRg As Range

strStop = InputBox("Position of tab stop in inches:")
If Len(strStop) 0 Then
nStop = CSng(Val(strStop))
If nStop 0 Then
Set oRg = Selection.Range
oRg.End = ActiveDocument.Range.End
oRg.Paragraphs.TabStops.Add _
Position:=InchesToPoints(nStop), _
Alignment:=wdAlignTabLeft, _
Leader:=wdTabLeaderSpaces
Set oRg = Nothing
End If
End If
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Rick wrote:
Sorry -- I really meant to ask how to do this in VBA code -- should
have posted in the VBA forum...

On May 22, 4:00 pm, Rick wrote:
Thanks; that does it. Is there an easy way to then return to where I
was before pressing Ctrl+Shift+End?

On May 19, 4:45 pm, "Jay Freedman" wrote:



Rick wrote:
I have text in my document below where my cursor is. How do I
create a tab stop that will be set for the rest of the document
forward? I know if I just enter a tab stop normally, it won't be
in effect for any text below my cursor position. Thanks.


Select all of the text where you want the tab stop to be set (most
easily by pressing Ctrl+Shift+End) and then set the tab stop.





  #7   Report Post  
Posted to microsoft.public.word.pagelayout
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default insert tab stop from this point forward

Yes, you can use a Range. Replace the lines

Set oRg = Selection.Range
oRg.End = ActiveDocument.Range.End

with

Set oRg = Selection.Sections(1).Range

This may not make much sense at first sight, but it means "the range of the
first section of which any part is in the Selection". If the Selection is wholly
within one section, then that is the section that will be affected.


On Fri, 22 May 2009 20:57:44 -0400, Rick wrote:

Fabulous; thank you. I'm trying to teach myself about
the Range object. How would I set a tab stop for the
current Section only (rather than the rest of the
document)? Do I still use Range for that?

In article ,
says...
This is kind of clumsy about getting the tab stop position, and you could
also ask the user for the alignment and leader type, but you get the idea...

Sub SetTabStopToEndOfDoc()
Dim strStop As String
Dim nStop As Single
Dim oRg As Range

strStop = InputBox("Position of tab stop in inches:")
If Len(strStop) 0 Then
nStop = CSng(Val(strStop))
If nStop 0 Then
Set oRg = Selection.Range
oRg.End = ActiveDocument.Range.End
oRg.Paragraphs.TabStops.Add _
Position:=InchesToPoints(nStop), _
Alignment:=wdAlignTabLeft, _
Leader:=wdTabLeaderSpaces
Set oRg = Nothing
End If
End If
End Sub


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
insert optional space after forward slash character Mickie Microsoft Word Help 3 April 16th 08 12:08 AM
Create an auto-forward (forward to a friend) button in html email Fairfield Displays Mailmerge 1 March 14th 06 01:47 PM
Is it possible to insert back/forward links in a non-website? Bob Page Layout 1 July 10th 05 12:32 AM
how to stop text from moving forward if a word or words are added. kel Microsoft Word Help 1 April 14th 05 02:34 AM
From this point forward? Catt Microsoft Word Help 1 January 14th 05 05:31 PM


All times are GMT +1. The time now is 08:45 PM.

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"