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
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.
Thank you, its just what I needed. "Jay Freedman" wrote: > 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. > > >