<?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 Macro to open html file using Microsoft Word in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-open-html-file-using-microsoft-word/m-p/13131196#M914</link>
    <description>&lt;P&gt;I am in just the begining process of creating a macro that will write my selected nc program files to setup sheet files and then open in it in Microsoft Word.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am getting an error in Powermill when trying to open the file called "linuep sheet.html". Its saying&amp;nbsp;"No program appears to be associated with the action 'open' on file 'C:/Powermill/1791/1791 cavity/SetupSheets_files/project_sheets/lineup&lt;BR /&gt;sheet.html'&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;FUNCTION Main (STRING $Selected_NCProgram)

{
    // Execute preliminary commands
    KEEP SETUPSHEETS NCPROGRAM SELECTED
    TEXTINFO ACCEPT
    SPLITTER TABEXPLORE

    // Get the main project directory and construct the correct path
    STRING mainDirectory = dirname(project_pathname(0), "/")
    STRING projectSubfolder = project.Name + "" 
    STRING htmlFilePath = mainDirectory + "/" + projectSubfolder + "/SetupSheets_files/project_sheets/lineup sheet.html"
    
    // Attempt to open the specified .html file in the correct directory
    OLE FILEACTION 'open' $htmlFilePath
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iamcdn79_1-1730812536904.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1429873i79EA45C271EB3AA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="iamcdn79_1-1730812536904.png" alt="iamcdn79_1-1730812536904.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know the right command to open a HTML file with Word? I already have Word set to always open HTML files in windows setting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Nov 2024 13:17:34 GMT</pubDate>
    <dc:creator>iamcdn79</dc:creator>
    <dc:date>2024-11-05T13:17:34Z</dc:date>
    <item>
      <title>Macro to open html file using Microsoft Word</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/macro-to-open-html-file-using-microsoft-word/m-p/13131196#M914</link>
      <description>&lt;P&gt;I am in just the begining process of creating a macro that will write my selected nc program files to setup sheet files and then open in it in Microsoft Word.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am getting an error in Powermill when trying to open the file called "linuep sheet.html". Its saying&amp;nbsp;"No program appears to be associated with the action 'open' on file 'C:/Powermill/1791/1791 cavity/SetupSheets_files/project_sheets/lineup&lt;BR /&gt;sheet.html'&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;FUNCTION Main (STRING $Selected_NCProgram)

{
    // Execute preliminary commands
    KEEP SETUPSHEETS NCPROGRAM SELECTED
    TEXTINFO ACCEPT
    SPLITTER TABEXPLORE

    // Get the main project directory and construct the correct path
    STRING mainDirectory = dirname(project_pathname(0), "/")
    STRING projectSubfolder = project.Name + "" 
    STRING htmlFilePath = mainDirectory + "/" + projectSubfolder + "/SetupSheets_files/project_sheets/lineup sheet.html"
    
    // Attempt to open the specified .html file in the correct directory
    OLE FILEACTION 'open' $htmlFilePath
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iamcdn79_1-1730812536904.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1429873i79EA45C271EB3AA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="iamcdn79_1-1730812536904.png" alt="iamcdn79_1-1730812536904.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know the right command to open a HTML file with Word? I already have Word set to always open HTML files in windows setting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 13:17:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/macro-to-open-html-file-using-microsoft-word/m-p/13131196#M914</guid>
      <dc:creator>iamcdn79</dc:creator>
      <dc:date>2024-11-05T13:17:34Z</dc:date>
    </item>
  </channel>
</rss>

