title: How to open text file with the help of button under any form?
body: <p>I have one text file(Notepad) put under resources node in AX 2012 AOT. Now, my task is to open this file with the help of button under any form.</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/cc967403.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/cc967403.aspx</a></p>
  
  <p>Above link is helpful when creating temporary file for writing or reading.
  Also, there is a form in AX 2012 named "smmDocuments" in which we can put text files of our use and we can open that file easily from there. I have researched and found that there is a class named "DocuAction" in AX 2012 to perform operations with text files.
  But I am unable to understand how that thing is working.</p>
  
  <p>///////////////////
  I got it working as:</p>
  
  <pre><code>void clicked()
  {
      //super();
     str sTempPath,
          sFileName = "notes.txt";
      SysResource::saveToTempFile(SysResource::getResourceNode(resourceStr(flow_for_address_book_txt)), false, "notes.txt");
      sTempPath = WinAPI::getTempPath();
      WinAPI::shellExecute(sTempPath+sFileName);
  }
  </code></pre>
  
  <p>Thanks Jan B.</p>