Paul Newton wrote:
> Hi
> 
> I am probably missing something very obvious (!) but am having a problem 
> with the following code when there are no shapes to select (it works 
> fine if there ARE shapes to select):
> 
>     loWindow = loVisio.ActiveWindow
>     loWindow.SelectAll
>     loSelection = loWindow.Selection
>     loSelection.Delete
> 
> It's the second line that is causing the problem.  How can I test 
> loWindow to check if there is anything to select ?

Can you ask for forgiveness instead of permission? IOW:

try
   loWindow.SelectAll
   loSelection = loWindow.Selection
   loSelection.Delete
catch
   ...
endtry



-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to