A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count Number of Selected Cells In A Table?



 
 
Thread Tools Display Modes
  #1  
Old September 22nd, 2008, 06:42 PM posted to microsoft.public.word.tables
Hapless
external usenet poster
 
Posts: 5
Default Count Number of Selected Cells In A Table?

Is there a way to determine how many cells have been selected in a table? We
work with very large tables of various sizes, from which we often have to
transfer data to a graphics layout application (Adobe InDesign) that just
isn't Word friendly. One of our compositors is working on a script to
translate tables into InDesign templates, and he tells me it would be helpful
for his purposes to know how many cells the user has selected, but that
doesn't seem to be something Word tells you.

Does Word provide this info in some place I don't know, or would it have to
be a macro-based solution? (If the latter, I'll repost to the VBA section.)

Thanks for your help!
  #2  
Old September 22nd, 2008, 09:26 PM posted to microsoft.public.word.tables
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Count Number of Selected Cells In A Table?

Hi Hapless,

You could use a macro like:
Sub SelectionCellCount()
If Selection.Information(wdWithInTable) Then _
MsgBox "Selection Cell Count: " & Selection.Cells.Count
End Sub

You could assign such a macro to a keyboard shortcut to facilitate its use.

--
Cheers
macropod
[MVP - Microsoft Word]


"Hapless" wrote in message ...
Is there a way to determine how many cells have been selected in a table? We
work with very large tables of various sizes, from which we often have to
transfer data to a graphics layout application (Adobe InDesign) that just
isn't Word friendly. One of our compositors is working on a script to
translate tables into InDesign templates, and he tells me it would be helpful
for his purposes to know how many cells the user has selected, but that
doesn't seem to be something Word tells you.

Does Word provide this info in some place I don't know, or would it have to
be a macro-based solution? (If the latter, I'll repost to the VBA section.)

Thanks for your help!

  #3  
Old September 23rd, 2008, 12:25 PM posted to microsoft.public.word.tables
Hapless
external usenet poster
 
Posts: 5
Default Count Number of Selected Cells In A Table?

Extremely helpful, macropod! I've passed the code on to the fellow writing
the script. Very cool!

Sorry about the delayed response, but I left work early yesterday. Thank you
so much!

"macropod" wrote:

Hi Hapless,

You could use a macro like:
Sub SelectionCellCount()
If Selection.Information(wdWithInTable) Then _
MsgBox "Selection Cell Count: " & Selection.Cells.Count
End Sub

You could assign such a macro to a keyboard shortcut to facilitate its use.

--
Cheers
macropod
[MVP - Microsoft Word]


"Hapless" wrote in message ...
Is there a way to determine how many cells have been selected in a table? We
work with very large tables of various sizes, from which we often have to
transfer data to a graphics layout application (Adobe InDesign) that just
isn't Word friendly. One of our compositors is working on a script to
translate tables into InDesign templates, and he tells me it would be helpful
for his purposes to know how many cells the user has selected, but that
doesn't seem to be something Word tells you.

Does Word provide this info in some place I don't know, or would it have to
be a macro-based solution? (If the latter, I'll repost to the VBA section.)

Thanks for your help!


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.