5 Replies Latest reply: May 15, 2014 9:59 AM by Becky _ RSS

    Monarch Pro 8 - OLE commands

    Becky _

      I just upgraded to Monarch Pro V8.0. 

       

      Below is the syntax I used to use to export a specific table.

      *************************************

      Set MonarchObj = CreateObject("Monarch32")

       

      MonarchObj.SetProjectFile ("path namePR-Auto-S2.prj")

      MonarchObj.ExportTable ("path nameAuto-PR-S2a.mdb")

      *************************************

       

      It worked okay, and always created a table with the name UNTITLED.  I could deal with that, and built that "fact" into all my other automated features -- it always created a "new database", and the table name was "Untitled".

       

      With the V8.0 upgrade, the table name it creates matches the filename -- it's no longer just "Untitled".  I read your Programmer's Guide and can see that there is a JetExportTable -- with extra options.  I attempted the syntax below, and I can't get Excel to like it in VBA.

       

      I have to use "quotes" around the path/filename because many times there are spaces, etc.  I'm assuming it has to do with the quotes -- but can't figure out the problem???

       

      *************************************

      MonarchObj.SetProjectFile ("path nameSF-Auto-S2.prj")

      MonarchObj.JetExportTable ("path nameAuto-SF-S2.mdb",stringTableName,0)

      *************************************

       

      P.S. I really like the extra OLE commands available!  I just need to figure out how to use them all.