{"id":1518,"date":"2015-12-17T12:35:46","date_gmt":"2015-12-17T20:35:46","guid":{"rendered":"http:\/\/systemsolver.com\/StatlerBlog\/?p=1518"},"modified":"2015-12-17T12:35:46","modified_gmt":"2015-12-17T20:35:46","slug":"libreoffice-use-macro-to-remove-macro","status":"publish","type":"post","link":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/2015\/12\/17\/libreoffice-use-macro-to-remove-macro\/","title":{"rendered":"LibreOffice use macro to remove macro"},"content":{"rendered":"<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\">I got two results from searches on using a macro to remove a macro.<\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\">===Use Case===<\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\">I want to have a macro run continuously searching for special characters and replacing them. Once the character replacement macro is completed I want the replacement macro to be deleted from the document.<\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\">I have initial information for that form to be filled out with that replacement macro. Once that information is filled out I want that macro gone because it will continue to search the next time the document is opened.<\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\">===<\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\">The two results I got were:<\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\"><a href=\"https:\/\/forum.openoffice.org\/en\/forum\/viewtopic.php?f=9&amp;t=39313&amp;start=0\">https:\/\/forum.openoffice.org\/en\/forum\/viewtopic.php?f=9&amp;t=39313&amp;start=0<\/a><\/p>\n<p style=\"color: black ! important; padding-left: 30px;\" data-blkn-colour=\"rgba(51,51,51,1)\"><code data-blkn-colour=\"rgba(46,139,87,1)\">Dim oStandard as object<br data-blkn-colour=\"rgba(46,139,87,1)\" \/><br data-blkn-colour=\"rgba(46,139,87,1)\" \/>oStandard = GlobalScope.BasicLibraries.getByName(\"Standard\")<br data-blkn-colour=\"rgba(46,139,87,1)\" \/>if oStandard.hasByName(\"Module2\")\u00a0 then<br data-blkn-colour=\"rgba(46,139,87,1)\" \/>\u00a0 oStandard.removeByName(\"Module2\")<br data-blkn-colour=\"rgba(46,139,87,1)\" \/>end if<\/code><\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\"><a href=\"http:\/\/mycomputeradventures.foxinnovations.be\/2012\/01\/removing-macros-from.html\">http:\/\/mycomputeradventures.foxinnovations.be\/2012\/01\/removing-macros-from.html<\/a><\/p>\n<p style=\"color: black ! important; padding-left: 30px;\" data-blkn-colour=\"rgba(51,51,51,1)\">Sub RemoveMacros<br data-blkn-colour=\"rgba(51,51,51,1)\" \/> basicLibraries = ThisComponent.BasicLibraries<br data-blkn-colour=\"rgba(51,51,51,1)\" \/> standard = basicLibraries.getByName( &#8220;Standard&#8221; )<br data-blkn-colour=\"rgba(51,51,51,1)\" \/> standard.removeByName( &#8220;Module1&#8221; )<br data-blkn-colour=\"rgba(51,51,51,1)\" \/> End Sub<\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\">Another post I&#8217;ll create later may have the replacement macro code and explanation<\/p>\n<p style=\"color: black ! important;\" data-blkn-colour=\"rgba(51,51,51,1)\">\n","protected":false},"excerpt":{"rendered":"<p>I got two results from searches on using a macro to remove a macro. ===Use Case=== I want to have a macro run continuously searching for special characters and replacing them. Once the character replacement macro is completed I want the replacement macro to be deleted from the document. I have initial information for that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1518","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/comments?post=1518"}],"version-history":[{"count":0,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1518\/revisions"}],"wp:attachment":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/media?parent=1518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/categories?post=1518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/tags?post=1518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}