Posted: Thu Nov 15, 2007 7:56 pm Post subject: Re: selection of table
elle0612 wrote:
Quote:
Hi
I want to be able to do a particular thing "if a table selection
exists".
If it does not exist I want a little message box to appear saying
"select the table first".
What is the vba code for this?
Thanks
If Selection.Information(wdWithInTable) Then
' do something
Else
MsgBox "Please select a table."
End If
--
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.
Posted: Thu Nov 15, 2007 8:11 pm Post subject: Re: selection of table
Thank you, its just what I needed.
"Jay Freedman" wrote:
Quote:
elle0612 wrote:
Hi
I want to be able to do a particular thing "if a table selection
exists".
If it does not exist I want a little message box to appear saying
"select the table first".
What is the vba code for this?
Thanks
If Selection.Information(wdWithInTable) Then
' do something
Else
MsgBox "Please select a table."
End If
--
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.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum