<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTABUG - Macro: run from Basic editor but error after running from document"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=121197#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTABUG - Macro: run from Basic editor but error after running from document"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=121197">bug 121197</a>
              from <span class="vcard"><a class="email" href="mailto:kamlan@post.cz" title="Kamil Landa <kamlan@post.cz>"> <span class="fn">Kamil Landa</span></a>
</span></b>
        <pre>Now I also discover it isn't bug :-). Now I'm testing in macro if oDoc IS
thisComponent


Sub macroBAD(optional oDoc as object) 'after click on button the atribute oDoc
is com.sun.star.awt.ActionEvent
        if IsMissing(oDoc) OR (NOT (oDoc IS thisComponent)) then
oDoc=thisComponent 'correct
        msgbox
oDoc.drawpage.getforms().getbyname("Form").getByName("buttonBAD").name 'error
after run from document
End Sub</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>