Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Bubbles Bubbles is offline
external usenet poster
 
Posts: 10
Default Select text in macro

Helo

Is it possible to select a column in a table when recording a macro without
scripting?
I can't seem to find a way using menu/menubars...

Thank you in advance.

Lena
  #2   Report Post  
Posted to microsoft.public.word.newusers
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 171
Default Select text in macro

No it isn't possible. You can write code to select a column provided
the table is uniform (i.e, no split or joined cells).

For example:

Sub Test()
Dim pMyPick As String
pMyPick = InputBox("Which column do you want to select?", "Column")
If pMyPick ActiveDocument.Tables(1).Columns.Count Then
MsgBox "There are not that many columns in this table."
Exit Sub
End If
If ActiveDocument.Tables(1).Uniform Then
ActiveDocument.Tables(1).Columns(pMyPick).Select
Else
MsgBox "Sorry :-(, You can't use VBA to select a column" _
& " in a table with mixed cell width!"
End If
End Sub

Where ActiveDocument.Tables(1) should be numbered to the table of
interest in the document or used Selection.Tables(1) and put the cursor
in the table before executing the macro.


Bubbles wrote:
Helo

Is it possible to select a column in a table when recording a macro without
scripting?
I can't seem to find a way using menu/menubars...

Thank you in advance.

Lena


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
Use mouse to select text in MS Word macro recorder. hellbent Page Layout 3 October 10th 06 11:54 AM
Arcane Question @ Text Boxes & "Frames" Elmer Page Layout 12 August 14th 06 08:34 AM
Word applies direct format on File open Uriel Microsoft Word Help 16 November 27th 05 07:22 PM
How to select paragraph between tow specified words? ALIOX Microsoft Word Help 1 June 28th 05 08:56 AM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM


All times are GMT +1. The time now is 06:45 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"