<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Run macro in ABAP Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-macro-in-abap-code/m-p/11732558#M1948952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;OF &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10.6667px; font-family: inherit; background: transparent;"&gt;W_EXCEL&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S33" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;'ExecuteExcel4Macro'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;EXPORTING &lt;/SPAN&gt;#1 &lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;'"SHOW.TOOLBAR(""Ribbon"",False)"'&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;The above code works to disable the button across the menubars but the 'Office Button' is still open for usage. When i apply the macro in excel. I get the below view of excel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/976221" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;But while using the code specified in ABAP, the following output in excel is achieved. I need to get the above functionality. Hope you can help.&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/976222" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 09:32:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-06-16T09:32:26Z</dc:date>
    <item>
      <title>Run macro in ABAP Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-macro-in-abap-code/m-p/11732556#M1948950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using OLE in ABAP Code to download excel file through my ABAP Code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;CREATE &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;OBJECT W_EXCEL &lt;SPAN class="L0S33"&gt;'EXCEL.APPLICATION'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;. &lt;/SPAN&gt;&lt;SPAN class="L0S31"&gt;"CREATE OBJECT FOR EXCEL&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SET &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;PROPERTY &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;W_EXCEL&amp;nbsp; &lt;SPAN class="L0S33"&gt;'VISIBLE' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;. &lt;/SPAN&gt;&lt;SPAN class="L0S31"&gt;"IN BACKGROUND MODE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;W_EXCEL &lt;SPAN class="L0S33"&gt;'WORKBOOKS' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;W_WORKBOOK&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;W_WORKBOOK &lt;SPAN class="L0S33"&gt;'ADD'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;. &lt;/SPAN&gt;&lt;SPAN class="L0S31"&gt;"CREATE A NEW WORKBOOK&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SET &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;PROPERTY &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;W_EXCEL &lt;SPAN class="L0S33"&gt;'SHEETSINNEWWORKBOOK' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;. &lt;/SPAN&gt;&lt;SPAN class="L0S31"&gt;"NO OF SHEETS&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SET &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;PROPERTY &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;W_EXCEL &lt;SPAN class="L0S33"&gt;'DisplayAlerts' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;W_EXCEL &lt;SPAN class="L0S33"&gt;'WORKSHEETS' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;sheet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52" style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; EXPORTING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #1 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;w_excel &lt;SPAN class="L0S33"&gt;'ActiveWorkbook' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;W_WORKSHEET&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;and so on..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;I want the below macro code to run while downloading, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Private Sub Workbook_Open()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End Sub&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide how to incorporate/convert the same in OLE ABAP Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Chehak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 07:26:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-macro-in-abap-code/m-p/11732556#M1948950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-06-16T07:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Run macro in ABAP Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-macro-in-abap-code/m-p/11732557#M1948951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have you tried with this?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;SPAN style="color: #333333; font-size: 10.6667px;"&gt;W_EXCEL&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S33"&gt;'ExecuteExcel4Macro'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXPORTING &lt;/SPAN&gt;#1 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'"SHOW.TOOLBAR(""Ribbon"",False)"'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;or this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;SPAN style="color: #333333; font-size: 10.6667px;"&gt;W_EXCEL&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S33"&gt;'SendKeys'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXPORTING &lt;/SPAN&gt;#1 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'^{F1}'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Ricardo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 08:56:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-macro-in-abap-code/m-p/11732557#M1948951</guid>
      <dc:creator>RicardoRomero_1</dc:creator>
      <dc:date>2016-06-16T08:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Run macro in ABAP Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-macro-in-abap-code/m-p/11732558#M1948952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;OF &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10.6667px; font-family: inherit; background: transparent;"&gt;W_EXCEL&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="L0S33" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;'ExecuteExcel4Macro'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;EXPORTING &lt;/SPAN&gt;#1 &lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;'"SHOW.TOOLBAR(""Ribbon"",False)"'&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;The above code works to disable the button across the menubars but the 'Office Button' is still open for usage. When i apply the macro in excel. I get the below view of excel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/976221" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;But while using the code specified in ABAP, the following output in excel is achieved. I need to get the above functionality. Hope you can help.&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;&lt;SPAN class="L0S55" style="font-weight: inherit; font-style: inherit; font-family: inherit; background: transparent;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/976222" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 09:32:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-macro-in-abap-code/m-p/11732558#M1948952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-06-16T09:32:26Z</dc:date>
    </item>
  </channel>
</rss>

