{"id":1772,"date":"2020-10-18T22:34:20","date_gmt":"2020-10-19T06:34:20","guid":{"rendered":"http:\/\/www.auval.com.mx\/notas\/?p=1772"},"modified":"2022-04-12T15:23:57","modified_gmt":"2022-04-12T22:23:57","slug":"encontrar-el-objeto-activo-en-power-point","status":"publish","type":"post","link":"https:\/\/auval.com.mx\/blog\/en\/2020\/10\/18\/encontrar-el-objeto-activo-en-power-point\/","title":{"rendered":"Encontrar el objeto activo en Power Point"},"content":{"rendered":"\n<p>Encontr\u00e9 este c\u00f3digo que se me hizo buen\u00edsimo.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Sub DetermineActiveShape()\n'PURPOSE: Determine the currently selected shape in PowerPoint\n'SOURCE: www.TheSpreadsheetGuru.com\/the-code-vault\n\nDim ActiveShape As Shape\nDim shp As Shape\n\n'Determine Which Shape is Active\n  If ActiveWindow.Selection.Type = ppSelectionShapes Then\n    'Loop in case multiples shapes selected\n       For Each shp In ActiveWindow.Selection.ShapeRange\n         'ActiveShape is first shape selected\n            Set ActiveShape = shp\n            Exit For\n       Next shp\n  Else\n    MsgBox \"There is no shape currently selected!\", vbExclamation, \"No Shape Found\"\n  End If\n\n'Do Something with the ActiveShape\n ' ActiveShape.TextFrame2.TextRange.Text = \"Hello!\"\nDebug.Print \"Top: \" &amp; ActiveShape.Top &amp; \" Left: \" &amp; ActiveShape.Left &amp; \"Height: \" &amp; ActiveShape.Heigth &amp; \" Width: \" &amp; ActiveShape.Width\nEnd Sub<\/code><\/pre>\n\n\n\n<p>Pego una imagen en PowerPoint, la formateo como me gusta y si quiero saber exactamente esos datos que aparecen en la ventana inmediata, le doy click al objeto y corro esta macro.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Encontr\u00e9 este c\u00f3digo que se me hizo buen\u00edsimo. Pego una imagen en PowerPoint, la formateo como me gusta y si quiero saber exactamente esos datos que aparecen en la ventana inmediata, le doy click al objeto y corro esta macro.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1772","post","type-post","status-publish","format-standard","hentry","category-office"],"_links":{"self":[{"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/posts\/1772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/comments?post=1772"}],"version-history":[{"count":1,"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/posts\/1772\/revisions"}],"predecessor-version":[{"id":1809,"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/posts\/1772\/revisions\/1809"}],"wp:attachment":[{"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/media?parent=1772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/categories?post=1772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auval.com.mx\/blog\/en\/wp-json\/wp\/v2\/tags?post=1772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}