General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Open document from browser with specific parameters

  • kris3842

    Open document from browser with specific parameters

    Participants 0
    Replies 1
    Last Activity 9 years, 4 months ago

    Hi,

    I need to open a specific document from a link in a browser in XMetal Author Essential 7.0… A database is browserbased…

    We have different custom setups(ctm-files) for different users, and the document is supposed to open with these setups…

    I have received first draft to how we are going to open excel-files from the browser from the developer, and need something similar for xmetal

    Reply

    Derek Read

    Reply to: Open document from browser with specific parameters

    XMetaL Author is also a COM server, so instead of “Excel.Application” substitute “XMetaL.Application” and then call appropriate APIs from there. Refer to the XMetaL Developer Programmers Guide for details on the various APIs available. There are several APIs for opening a file:

    Application.Documents.Open() — opens a file in a way that is probably closest to what you are doing with Excel.
    Application.Documents.OpenTemplate() — opens a file and treats it as a template.
    Application.Documents.OpenString() — creates a new file based on a string you provide.

    Keeping with your naming scheme you would probably call Open() like this:

    var xmApp = new ActiveXObject(“XMetaL.Application”);
    var xmDoc = xmApp.Documents.open(“c:\test\test.xml”);

    In the case of XMetaL Author you do not need to worry about visibility as that is the default. If your script needs to known when XMetaL Author has finished starting up you can use the Application.InitComplete property.

    If this will be an integration with a content management system (CMS) that will be used by more than one of our clients please consider creating a “connector” using the XMetaL Connector SDK (our partner manager can provide details). A connector is the preferred method for integrating with any CMS as it allows the software to function seamlessly with most document-level customizations.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support