IBM Support

LO42968: LAUNCHING THE PRODUCTIVITY EDITORS PROGRAMMATICALLY VIA LOTUSSCR IPT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • I came across the following issues when launching the
    Productivity Editors
    (Calc and Writer) from LotusScript:1) The document is not opened
    as a
    window/tab in the Notes client, but is opened in a separate
    window.2) After
    closing the document (with or without saving), another document
    cannot be
    opened and I get the error "Cannot create automation object".I
    am attaching the
    code I used to reproduce these issues.  I placed this code in a
    button on a
    Notes document.
    
    I followed the instruction in the Prod Tools
    toolkit
    documentation,
    10.1 Sample LotusScript code
    
    Sub Initialize
    Dim objservicemanager As Variant
    Dim objText As Variant
    Dim args()
    Set objServiceManager =
    CreateObject("com.sun.star.ServiceManager")
    Set objCoreReflection=
    objServiceManager.createInstance("com.sun.star.reflection.CoreRe
    flection")
    Set objDesktop =
    objServiceManager.createInstance("com.sun.star.frame.Desktop")
     ethe sample create a blank document, it is also possible to loa
    from URL
    Set objDocument =
    objDesktop.loadComponentFromURL("private:factory/swriter",
    "_blank", 0, args)
    Set objText = objDocument.getText()
    Set objCursor = objText.createTextCursor()
    objText.insertString objCursor, "JMP204", False
    'more other calls to operate on the document model
     edispose the document
     eobjDocument.dispose
    End Sub
    
    And added the code above to a button.  It fails as described by
    the partner.  I
    then uncommented, objDocument.dispose and the "Cannot create
    automation object"
    error didn't occur, but since the object is being disposed it is
    being closed
    almost immediately after creating.  Also, The first time the
    object is created
    it is created as a separate window but after uncommenting
    dispose, on following
    executions it is created on a tab.  I then commented the
    objDocument.dispose
    again, so it would remain displayed and it began working
    correctly.  We need
    development to document a sample which works as advertised.
    
    Test Results from Symphony and ISV Enablement
    Team.  Susan
    and I will be recommending the workaround used in Test 2 to the
    partner
    Shireburn.  Since the work-around is valid, I recommend triage
    move this SPR to
    8.0.2.
    
    Test 1 - Symphony launched with default settings
    Script runs fine
    opens Symphony quickly with a new document created - IN A NEW
    WINDOW - one
    thing to note here - there are no menus along the top when this
    window launches
    - will confuse users
    Save that document
    Close Symphony
    Press button again
    new doc created IN NEW TAB
    This works as many times as you do it - always in a new window
    until you save
    a document and close symphony - then it begins launching in a
    tab.
    
    Test 2. - set symphony not to launch automatically with OS
    Ran script
    Symphony opens a little slower than before
    Document opens inside Notes client IN A NEW TAB
    Ran script multiple times with documents saved and unsaved -
    with documents
    open or closed
    Result are the same - a new document in a new TAB - no script
    errors
    
    Confirmed - soffice was NOT running when the client was first
    opened, but
    loaded after the first script ran and was running as a task
    consistently after
    that
    
    
    Test 3.   (same results as Test 1)
    Added symphony launch back to user prefs
    Rebooted OS
    Run script - the first instance opens in a second window.
    Close that window (saved doc) - one thing to note here - there
    are no menus
    along the top when this window launches - will confuse users
    Second time the script ran, the document opened as a tab.
    All other script runs successfully produce a new document in a
    new tab
    
    
    Test 4 - Continuing with the test 3 scenario - I MANUALLY
    stopped the
    soffice.exe task with Windows task manager
    Run the script again
    When I do this, the ORIGINAL error - "Cannot create automation
    object"
    
    Test 5 - Symphony launched with default settings, MANUALLY
    stopped the
    soffice.exe task with Windows task manager before running
    test.
    Same results as Test 2.
    
    Test from Symphony Team:
    Workaround:
    1.Build info: 8.0.1 20080103.1430
    2.Disable preload Symphony
    
    Steps:
    1.Launch Hannover
    2.Select menu File -> Preferences -> Symphony, uncheck "Launch
    IBM Symphony in
    the backaround when the operating system starts."
    3.Click OK to close the Preference dialog
    4.Close Hannover
    5.Restart operating system
    6.Launch Hannover
    7.Open the sample DB and click the button in the view
    
    Result:
    The Symphony document is created in new tab page correctly.
    

Local fix

Problem summary

  • A programming error was found and will be corrected in a future
     release.
    

Problem conclusion

  • A programming error was found and will be corrected in a future
     release.
    

Temporary fix

Comments

  • This APAR is associated with SPR# WEBB79TBNA.
    

APAR Information

  • APAR number

    LO42968

  • Reported component name

    NOTES CLIENT

  • Reported component ID

    5724E6255

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-08-04

  • Closed date

    2009-08-30

  • Last modified date

    2009-08-30

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • NA
    

Fix information

  • Fixed component name

    NOTES CLIENT

  • Fixed component ID

    5724E6255

Applicable component levels

  • R850 PSN

       UP

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SSKTWP","label":"Lotus Notes"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
30 August 2009