TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:VBA routine for selecting through a Word table? From:"David Slonosky" <David_Slonosky -at- i2 -dot- com> To:techwr-l -at- lists -dot- raycomm -dot- com Date:Tue, 7 Sep 1999 11:57:47 -0400
I'm trying to write a routine that goes through a Word table selecting text and
stopping at the end of the current column. The following code isn't working. If
anyone has any suggestions, I'd be grateful.
Selection.MoveDown Unit:=wdLine, count:=1
Selection.HomeKey Unit:=wdLine
Selection.MoveRight Unit:=wdCharacter, count:=1, Extend:=wdExtend
If Selection.Text = "A" Then
ActiveDocument.Bookmarks.Add Name:="Placeholder"
Selection.MoveDown Unit:=wdLine, count:=1, Extend:=wdMove
Selection.MoveRight Unit:=wdCharacter, count:=2, Extend:=wdExtend
Do Until Selection.Type <> wdWithInTable
Selection.MoveDown Unit:=wdLine, count:=1, Extend:=wdExtend
Loop
Selection.MoveUp Unit:=wdLine, count:=1, Extend:=wdExtend
End If