c# - Can I deselect something in MS Word that had earlier been selected in the program -
i have piece of code part of event handling selecting image in word document , copying in file. after event handler done, image shown selected when return word after event has been handled. code snippet follows :
foreach (word.inlineshape shape in shapes) { string filepath = "somepath"; shape.select(); word.application application = globals.thisaddin.application; application.selection.copyaspicture(); computer comp = new computer(); image image = comp.clipboard.getimage(); image.save(filepath, system.drawing.imaging.imageformat.jpeg); comp.clipboard.clear(); }
i want shape should not shown selected because shape selection part of event handling.
is there way deselect shape.
thanx suggestions.
you deselect current selection using
application.selection.collapse()
Comments
Post a Comment