c# - Select Shape on SlideMaster in PowerPoint 2007 -


i working on plugin powerpoint ,which interacts when powerpoint in slidemaster view.

depends on content, need select shapes on either slidemaster or on customlayouts.

i have managed select them on customlayouts, did not manage that, when shapes located on slidemaster.

i tried use following approaches:

first approach

presentation.designs[1].slidemaster.shapes[1].select(); 

this approach works when user manually selects particular slide master. otherwise exception:

"shape (unknown member) : invalid request. select shape, view must active."

second approach

presentation.application.activewindow.view.slide = document.designs[2].slidemaster; 

when use approach following exception:

attempted read or write protected memory. indication other memory corrupt.

i did not find ways activate slidemaster select shapes on it.

are ways that?

thank in advance.

to select in powerpoint, need manage window's view. allow select first shape on slide master switching view first:

for powerpoint 2007:

commandbars.executemso ("viewslidemasterview") doevents activepresentation.slidemaster.customlayouts(1).select sendkeys ("{up}") 

the non-sendkeys method should work doesn't on 2007 (tested ok on powerpoint 2016):

activewindow.viewtype = ppviewmasterthumbnails activewindow.view.slide   .shapes(1).select end 

as aside, need select object? depending on you're doing it, might not need select , hence don't need manage window views. example, if want copy or format it, don't need select it. if want group else need select first.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -