Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2015, 03:38 AM
macropod's Avatar
macropod macropod is offline move cursor Windows 7 64bit move cursor Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,343
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Since you haven't posted any code, you can't expect much help in diagnosing any issues you might be having. Simply saying "These are not working for my code" is meaningless without a context.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 07-06-2015, 03:50 AM
anand anand is offline move cursor Windows 7 64bit move cursor Office 2010 32bit
Novice
move cursor
 
Join Date: Jun 2015
Posts: 15
anand is on a distinguished road
Default

Code:
Sub a()
Dim orng As Word.Range
Selection.HomeKey Unit:=wdStory
Do
  Selection.EndKey Unit:=wdLine
  If Selection.End >= ActiveDocument.Content.End - 1 Then
    Exit Do
  End If
  Set orng = ActiveDocument.Bookmarks("\Line").Range
  With orng
    .Collapse wdCollapseStart
    .MoveEnd wdCharacter, 1
    .Select
    ans = IsNumeric(orng)
    If orng.Font.Bold = False And ans = False Then
      Selection.HomeKey Unit:=wdLine
      Selection.TypeText Text:=vbTab
    End If
    'Do something with oRng
  End With
  Selection.MoveDown Unit:=wdLine
Loop
lbl_Exit:
Exit Sub
End Sub
I am using this code to insert tab for statements that are using more than 1 line.It is working well for first column but not for snaking column. I have to insert tab for all statements that are using more than 1 line.

Last edited by macropod; 07-06-2015 at 04:03 AM. Reason: Added code tags & formatting
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
move cursor Put the cursor at the end of a comment mrlemmer11 Word VBA 1 06-25-2015 09:56 AM
How do I move the cursor back to the text from a comment without using the mouse? MsT Word 2 04-24-2014 05:48 PM
cursor madness jamesschot Word 0 02-18-2010 07:32 AM
cursor disappears ehamike Word 0 04-03-2009 07:56 PM
can't move the cursor in Word pieboy Word 2 02-13-2009 07:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft