News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Invalid Window type for this action

Started by madhushalini.p, August 19, 2011, 06:52:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

madhushalini.p

Hi

vApp.ActiveWindow.DeselectAll()

        For ik = 0 To shapeobject.Count - 1
            vApp.ActiveWindow.Select(vApp.ActiveWindow.Page.Shapes.ItemFromID(shapeobject(ik).id), Visio.VisSelectArgs.visSelect)

        Next

    vApp.ActiveWindow.Selection.Group()
I am also getting the same error:Invalid window type for this action.

Any help is appreciated...
Thanx in advance


Visio Guy

Hi MH,

What is shapeobject? If it's a Visio.Shape, then .Count won't work properly. Is it a Collection of shapes?

If shapeobject is a grouped shape, then you need shapeobject.Shapes.Count. And then you are trying to subselect shapes within a group, which is probably going to need some tweaking with IterationMode to work properly.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 167 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1055KB.
Tokens: post-login.
Cache hits: 13: 0.00175s for 26,740 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]