Application object with startup switches

Hi,
I'm trying to fix the next problem an need some more help. I want to open
as a NEW Word 97 document a Word file that is created/saved as a .dot file.
I already find out I have to use the /t command line parameter to open this
file as a NEW document by clicking on the icon in the NAL. Without the /t
it will just open the .dot file as <filename>.dot But in the .dot file is a
macro nested to fill in some parameters. What do I have to add to open this
macro as well when clicking on this NAL icon? I've been looking on the next
site "http://support.microsoft.com/default.aspx?scid=kb;en-us;70014" but
cannot find here the use of 2 switches in one line. I can't imagine this
isn't possible.
Anyone an idea?
Thanks Rob

Tie the macro to an OnOpen event ?
Cheers Dave
Dave Parkes [NSCS]
Occasionally resident at http://support-forums.novell.com/

Similar Messages

  • Configure Word 2010 startup with /n switch.

    Hello,
    Opening MS Word with /n switch, Example "C:\Program Files\Microsoft Office\Office\Winword.exe" /n, Word 2010 will start a new instance of Word with no document open. Can this be done via GPO as we are looking into configuring this for hundreds
    of users. Thanks.

    Hi,
    I don't know a direct way to realize this via GPO, but a workaround may be helpful.
    Since the path for all users should be the same(C:\Program Files\Microsoft Office\Office\Winword.exe), we can make one shortcut, then modify its Properties -> Add
    /n to the target behind the full path C:\Program Files\Microsoft Office\Office\Winword.exe. It will be like "C:\Program Files\Microsoft Office\Office\Winword.exe" /n
    in the shortcut properties, save it to a shared folder, then create a startup script which pulls this shortcut from the shared folder to the user's local desktop.
    Since I'm not a script expert, you may need to contact other resource for further assistance.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Accessing Java Object with out any application servers

    Hi,
    I would be much thankful if any one guide/suggest me how to
    access an java object with out using any application servers.I am
    having an java object which holds dummy data and an mxml file which
    contains some text fields. My plan was to access the java object
    and put the dummy data in the text fields. I am using RemoteObject
    for this. I am not able to proceed further. Please help me.
    Thanks in advance
    Regards
    Karun Kumar

    You can check The Merapi Project it's still in the
    development phase but it'll allow to an AIR app invoke a java class
    and run it as it were inside your app. But that's something you
    can't take into production yet, why don't u wanna use a server
    backend?

  • Recordset - updating 2 tables with 1 recordset using application object update record

    I have a recordset that uses a field from 2 different tables
    with a select statement where clause that joins a userid. I can
    display the field’s data just fine. Now I want to use the
    Application object “update record” so I can modify
    either of the fields. The problem is the Application object
    “update record” only allows you to update one table.
    How does Dreamweaver mx 2004 allow me to update 2 tables with one
    recordset and 1 submit button? Currently using php.
    Example of where:
    Where member.userid = member_detail.userid
    I tried creating the one form with the field from the first
    table and that works just fine. I added the other field from the
    other table into the form but ofcourse there isn’t any code
    that will update the second table so it won’t work.
    My application requires me to update alot of fields between 2
    tables at the same time.
    Does anyone know a way using Dreamweaver mx 2004 to do this?
    I don’t have much php experience.

    jon-rookie wrote:
    > DreamerJim,
    >
    > I am sorry but I don't think you are correct. I just
    can't believe that with
    > all the powers to be at Macromedia and now Adobe can't
    figure out how to update
    > two tables at once. There are millions of db's out there
    that require this. I
    > spent several hours today perusing lots of posts on the
    internet. It seems I
    > am not the only one out there that has asked this
    question. Unfortunately
    > there are no good answers yet to my surprise.
    >
    > I did find a Dreamweaver extension that does exactly
    what I myself and many
    > others want. The problem is it is no longer available
    unless you purchase a
    > bundle of software from Adobe.
    >
    > I have not looked into it in detail so I am not 100%
    sure that is accurate!
    >
    > Still, alot of php programmers do this all the time
    without much trouble. I
    > just want to know if Dreamweaver mx 2004 has the
    capability if a person knows
    > the right steps.
    >
    > Hopefully a Dreamweaver expert will post something to
    let us know for sure.
    > Until then I am stuck.
    >
    Not even CS3 has this built in, you will either have to code
    it yourself
    or buy the extension you have found. Dreamweaver gives you
    basic
    features to help you develop applications, but if you want to
    do
    anything really clever you have to do it yourself.
    One thing to consider is maybe creating an SQL view that is
    can be
    updated. I am pretty sure it exists, then you use the view
    instead of
    the table in the update behaviour. I have never done it
    myself, but I am
    sure it can be done.
    Steve

  • IDOC - process code with error "Application Object Type not planned'

    Hi all,
    I am doing an inbound idoc.... in TCODE we42, i trying to put function module which i created, attached to the process code.
    However, when i put my function module ZIDOC_INBOUND to the process code... it comes out error, 'Application Object Type not planned.'
    Why is this so?
    Please advice...
    Thanks and regards...
    William Wilstroth

    HI all,
    I had solved this problem. I should have gone to we57 to tie the function module.
    thanks.
    William Wilstroth

  • CS3 Extension that initializes a JS-Object during startup is not working in CS4

    Here is a simple Extension that works fine in DW CS3 and doesn't work in DW CS4 (trial version):
    The File myObj_Startup.htm was placed in Folder Configuration/Startup. It initializes a quite simple Javascript-Object during Startup of DW.
    Content of myObj_Startup.html:
    <!-- MENU-LOCATION=NONE -->
    <HTML>
    <HEAD>
    <TITLE>beim &Ouml;ffnen</TITLE>
    <SCRIPT LANGUAGE="javascript">
    myObj =
         showMsg : function (msg)
             alert(msg);
    function onOpen()
       myObj.showMsg("startup");
    // SCRIPT ENDE
    </SCRIPT>
    </HEAD>
    <BODY onLoad="onOpen();">
    </BODY>
    </HTML>
    Besides this, an additional menuitem was defined in menus.xml to use the JS-object myObj:
    <menu mmstring:name="menus/DWMenu_File" id="DWMenu_File">
            <menuitem name="Test" command="myObj.showMsg('Testing');" enabled="true" domRequired="false" id="DWMenu_File_SIEMENSTEST" />
            <menuitem mmstring:name="menus/DWMenu_File_New" key="Cmd+N" command="dw.newDocument()" enabled="true" domRequired="false" id="DWMenu_File_New" />
    With Dreamweaver CS3 everything works out fine: I get a Alert-message: "startup" during Startup and when I'm clicking Menu->File->Test I get a Alert-message: "Testing".
    With Dreamweaver CS4  (trial version) I get a message: "startup" as well but when I'm clicking Menu->File->Test I get no message.
    Instead I get a Logfile "C:\Documents and Settings\user\Application Data\Adobe\Dreamweaver CS4\en_US\Configuration\Logs\DW JavaScript.log" telling me:
       JS Error:
           myObj is not defined
           filename:
           lineno: 0
           While executing DWMenu_File_TEST command in menus.xml, the following JavaScript error(s) occurred:
           ReferenceError: myObj is not defined
    Why is this simple extension working in DW CS3 and not working in DW CS4?
    Did they change the treatment of JS-objects initialized during startup?
    Is the object out of scope?
    Are such extensions not working in trial versions of DW CS4?
    I cannot explain this behavior - please help!

    Hi,
    I have an similar problem and couldnt find an workaround for the problem.
    When i add an new menu item to the menus.xml file, the menu item shows up, but my custom command (simple alert) wont trigger.
    Can somebody please help?

  • Using multiple UIWebView objects with a Tab Bar Controller.

    So, I'm pretty new to this cocoa touch language and seem to be hitting a road block.
    I have an application that will use a Tab Bar Controller as a navigation. Each tab will display a different UIWebView object that's been linked to their own URL's. I can't for the life of me figure out how to get past the first UIWebView. If they're all the same object, with the same name, how can I set a different url for each??
    I've been going nuts over this for the past few hours and can't find any documentation online so any help would be AMAZING. Thank you very much.
    Message was edited by: thenameisjesse

    If they're all the same object, with the same name, how can I set a different url for each??
    They're not the same object. You alloc and setup each UIWebView independently.
    UIWebView is just a view so set it up the same way you would if you had a tabbar with multiple views.
    The default template has 2 views as I recall. Change the UIViews to UIWebView. As you switch them in set the URL and have it load.

  • What is the problem with converting objects with gradients to gradient mesh?

    What is the problem with converting objects with gradients to gradient mesh?

    slange,
    There may arise some smaller corruption states that may be cured by what you did, as you can see in the list. Sometimes, restarting thrice is needed.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save curent artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • Persist object with Hashtable

    Hello, I am trying to persist an object with a Hashtable.
    I have a Feature object which has a hashtable of qualifiers. Both of the
    key and value are of java.lang.String data type.
    In my System.jdo:
         <package name="com.primaci.bioprojects.plugins.geneMap">
              <class name="Feature">
                   <field name="_qualifiers">
                        <map key-type="java.lang.String" embedded-key="true"
    value-type="java.lang.String" embedded-value="true"/>
                   </field>
              </class>
         </package>
    After running ant, when I try to run the web application, I got the
    following exception, is there anything wrong with the system.jdo?
    javax.servlet.UnavailableException: Startup exception:
    javax.jdo.JDOFatalUserException: The system could not initialize; the
    following registered persistent types are missing metadata or have not
    been enhanced: [class com.primaci.bioprojects.plugins.geneMap.Feature].
         at
    com.primaci.bioprojects.startup.StartupServlet.init(StartupServlet.java:68)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
         at
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3267)
         at
    org.apache.catalina.core.StandardContext.start(StandardContext.java:3384)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
         at
    org.apache.catalina.core.StandardService.start(StandardService.java:388)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

    Alex,
    What you did looks about right. The exception that you are seeing is
    because you have not registered the Feature class with Kodo JDO. You can
    do this either by running the schematool or by enumerating all the
    persistent types in the 'persistent-types' preference. See the Kodo JDO
    User Guide for more information.
    -Patrick
    [email protected] (Alex Tang) writes:
    Hello, I am trying to persist an object with a Hashtable.
    I have a Feature object which has a hashtable of qualifiers. Both of the
    key and value are of java.lang.String data type.
    In my System.jdo:
         <package name="com.primaci.bioprojects.plugins.geneMap">
              <class name="Feature">
                   <field name="_qualifiers">
                        <map key-type="java.lang.String" embedded-key="true"
    value-type="java.lang.String" embedded-value="true"/>
                   </field>
              </class>
         </package>
    After running ant, when I try to run the web application, I got the
    following exception, is there anything wrong with the system.jdo?
    javax.servlet.UnavailableException: Startup exception:
    javax.jdo.JDOFatalUserException: The system could not initialize; the
    following registered persistent types are missing metadata or have not
    been enhanced: [class com.primaci.bioprojects.plugins.geneMap.Feature].
         at
    com.primaci.bioprojects.startup.StartupServlet.init(StartupServlet.java:68)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
         at
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3267)
         at
    org.apache.catalina.core.StandardContext.start(StandardContext.java:3384)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
         at
    org.apache.catalina.core.StandardService.start(StandardService.java:388)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • APEX application problem with Apple's Safari browser

    Hello Everyone,
    I'm working on Apple Safari (version 4.0.5) with Oracle APEX 4.0, the APEX development environment is working fine, but when we try to run our application, after login, while switching tabs, our application hangs with the following URI in the browser
    xxx.xxx.x.xxx/apex/wwv_flow.accept
    and page is rendered blank, even the page source view is blank.
    Our page also carry some JQuery related code functionality, along with regular HTML and Stylesheet.
    No idea what is causing this behavior?
    Our application is running smooth with browsers like IE, FF, Opera.
    Sample applications provided in-bundled with APEX 4.0, are running good on Safari as well.
    So kindly suggest, what could be the possible reason behind this?
    Regards,
    Krishna

    Hi Patrick,
    Yes, I'm using my own custom made theme also involved JQuery javascripts & functionality on apex pages.
    I'm using Safari 4.0.5, didnt checked with the latest version yet.
    Yes I've tried it on Google Chrome, its working fine, except with the already know issue, that on each page's post-back, chrome prompts for the XDB Username and Password, which is also a very major issue with my application.
    I've gone through various threads from OTN to look out for the possible fix to this issue, but not helpful so far. Have tried few alternatives suggested on OTN, after which landed up in more complex issues causing my application to prompt XDB credentials on all the browsers. Now some how have brought the application back to the previous state, with the help of OTN indeed. Presently my application execute fine with IE, FF & Opera, except Safari & Chrome (XDB credentials prompt).
    It would be really not an easy task for me to replicate the same scenario on apex.oracle.com, because it involves various database tables too.
    I'm wondering, you asked me the 'theme' subject for the issue, kindly would you please educate me more, how themes can cause an improper functionality on Safari and not in rest of the browsers?
    Thank you so much Patrick, I'm partially relieved knowing that you responded me. Great pleasure learning from you.
    Regards,
    Krishna

  • Opening PDF File in VB6. Application is Busy message: Switch To or Retry

    Hi
    A legacy VB6 app uses an OLE Container to open up a PDF file in Adobe Reader, with the below code:
    [CODE]       
            App.OleServerBusyRaiseError = True
            oleContainer.Class = olePDF
            oleContainer.AutoActivate = vbOLEActivateAuto
            oleContainer.SourceDoc = txtImageFile.Text
            oleContainer.CreateLink oleContainer.SourceDoc
            oleContainer.HostName = App.FileDescription
            oleContainer.DoVerb vbOLEPrimary
    [/CODE]
    The users have started reported instances of this leading to the following message:
    "This action cannot be completed because the other application is busy. Choose Switch To to active the busy application and correct the problem"
    With options to 'Switch To' and 'Retry'. Selecting these options do not do anything.
    Any ideas how to resolve?
    A few observations:
    1. The are running on Server 2008 R2 64bit
    2. The are running Adobe Reader v10.1.4
    3. I have also noted Adobe reader 9 is also installed
    4. I note that when this occurs there is more than one instance of AcroRd32.exe listed in processes. If I kill these processes the message disappears
    5. The user have reported it does not occur all the time
    6. When I have been able to recreate this in my own environment by reducing OLERequestPendingTimeout the problem is resolved by selecting 'Switch To'. Selecting 'Switch To' does not resolve this problem for my users.
    7. When calling this code in my environment Adobe Reader opens in front of the VB6 app. In the user's environment it opens behind the VB6 app.
    Thanks in advance

    You need to switch from using VB6 at this point.  As of the latest update, VB6 compiled applications will stop working with Adobe Reader. See the following KB: 
    PDF applications built with VB6 don't work with Acrobat 11.0.07

  • Inserting a new row in a BC4J View Object with an attribute of type BFileDomain

    Hi all,
    I've to insert a row in a View Object with an attribute of type oracle.jbo.domain.BFileDomain.
    I do this within an Application Module's method, which has an input parameter of type byte[]. This parameter will be the content of the BFILE.
    What's the right way for doing that?
    I've tried with the following code, but I've got an exception in committing the transaction:
    public int serializeDocument(int codDomanda, int codSorgente, byte[] content, String est, int type, int cost, String title, String arg) throws JboException {
    int code = 0;
    //File f;
    DocumentiTwoView = getDocumentiTwoView();
    java.sql.Statement stmt = ((DBTransaction) getTransaction()).createStatement(1);
    try {
    Row docRow = DocumentiTwoView.createRow();
    SequenceImpl seq = new SequenceImpl("documenti_seq", getDBTransaction());
    Integer next = (Integer) seq.getData();
    code = next.intValue();
    docRow.setAttribute("Coddocumento", new Number(code));
    docRow.setAttribute("Titolo", (String) title);
    docRow.setAttribute("Argomento", (String) arg);
    docRow.setAttribute("Costo", new Number(cost));
    docRow.setAttribute("Tipo", new Number(type));
    docRow.setAttribute("Coddomanda", new Number(codDomanda));
    docRow.setAttribute("Codsorgente", new Number(codSorgente));
    //f = new File("Doc" + code + "." + est)
    BFILE src_lob = null;
    ResultSet rset = null;
    rset = stmt.executeQuery ("SELECT BFILENAME('DOC_DIR', 'Doc" + code + "." + est + "') FROM DUAL");
    if (rset.next()) {
    src_lob = ((OracleResultSet)rset).getBFILE(1);
    BFileDomain bfd = new BFileDomain(src_lob);
    bfd.setBytes(content);
    bfd.saveToDatabase(getTransaction());
    docRow.setAttribute("Contenuto", (BFileDomain) bfd);
    catch (Exception ex) {
    getTransaction().rollback();
    throw new oracle.jbo.JboException("Impossibile creare il nuovo documento:\n" + ex.getMessage());
    finally {
    try {
    stmt.close();
    catch (Exception nex) {
    try {
    // Commit the whole transaction
    getTransaction().commit();
    catch (Exception e) {
    e.printStackTrace();
    getTransaction().rollback();
    throw new JboException("Impossibile eseguire il commit della transazione:\n" + e.getMessage());
    return code;
    Thanks a lot in advance!
    Christian
    null

    Odd, have you disabled caching and indirection? (NoIdentityMap, dontUseIndirection, or alwaysRefresh/disableCacheHits). If so, then this could be the issue.
    Otherwise please include the sample code you use to perform this, and verify that you do not have any unusual code in your set/get methods or in descriptor events. Also turn TopLink logging on and include a sample. Also ensure that you do not modify your objects until after registering them in the unit of work, and only modify the unit of work clones.

  • Invalid method "Save As" from Excel application object

    I have Windows 2000 and Excel 2002 installed on my machine.
    I down loaded "renamed Excel 2000 workbook.vi" from NI website. Relinked ref num to Excel application object but get the error of invalid method (Save As). Tried to relink invoke node to Save As by selecting method from drop down menu. However this method is not on the list. Tried other excel objects but can not find "Save As" method. Has this been removed/moved?

    I was able to correct the error by relinking the Workbooks->Open to Open. This changes the subsequent Invoke Node from IAppEvents to _Workbook. There you will find the Save As method.
    Michael
    www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • How to Use AccessibleObjectFromWindow API in VBA to Get Excel Application Object from Excel Instance Window Handle

    I need to get the Excel.application object from a window handle using AccessibleObjectFromWindow. I can't seem to make the code work. First, I successfully search for the XLMAIN windows. Then, when I get a handle, I execute the AccessibleObjectFromWindow
    function. It seems to return a value of -2147467262 in all cases. Therefore, I believe that it is returning an error value. I can't figure out how to determine the meaning of this value.
    If it is an error value, I believe that one or more arguments are in error. My best guess at present is that the GUID argument is incorrect. I have tried two GUID values: {00020400-0000-0000-C000-000000000046} and {90140000-0016-0409-0000-0000000FF1CE}.
    I have seen both used in conjunction with OBJID_NATIVEOM. Neither one seems to work. I really would prefer not to use the second one as it has an Excel major and minor version number. I would hate to have to change this code, if a new minor version appeared.
    The attached code has been commented to show which parts have been shown to work and which not. I'm at my wits end and really need help.
    Thanks
    'This module is located in Access 2010, but this is an Excel question.
    Option Compare Database
    Option Explicit
    ' Module-Level Declarations
    'The GetDesktopWindow function and FindWindowEx function work just fine.
    Public Declare Function GetDesktopWindow Lib "user32" () As Long
    Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
    (ByVal hWnd1 As Long, _
    ByVal hWnd2 As Long, _
    ByVal lpsz1 As String, _
    ByVal lpsz2 As String) _
    As Long
    'I'm not getting the expected output from this function (see below)
    Private Declare Function AccessibleObjectFromWindow& Lib "oleacc.dll" _
    (ByVal hwnd&, _
    ByVal dwId&, _
    riid As GUID, _
    xlwb As Object)
    Type GUID
    lData1 As Long
    iData2 As Integer
    iData3 As Integer
    aBData4(0 To 7) As Byte
    End Type
    Function ExcelInstances() As Long
    ' Procedure-Level Declarations
    ' Value of OBJID_NATIVEOM verified by checking list of Windows API constants _
    on this site: http://www.lw-tech.com/q1/base.htm
    Const OBJID_NATIVEOM = &HFFFFFFF0
    Dim hWndDesk As Long 'Desktop window
    Dim hWndXL As Long 'Child window
    Dim objExcelApp As Object 'Final result wanted: Excel application object
    'Following variable (xlapp) to be set by AccessibleObjectFromWindow function
    Dim xlapp As Object
    Dim IDispatch As GUID 'GUID used in call to AccessibleObjectFrom Window function
    'Set up GUID to be used for all instances of Excel that are found
    Dim tmp1 As Variant 'Return value from AccessibleObjectFromWindow
    ' Executable Statements
    SetIDispatch IDispatch
    IDispatch = IDispatch
    'Get a handle to the desktop
    hWndDesk = GetDesktopWindow 'This seems to work
    Do
    'Get the next Excel window
    'The following statement seems to work. We are finding and counting _
    correctly all the instances of Excel. hWndXL is non-zero for each _
    instance of Excel
    hWndXL = FindWindowEx(GetDesktopWindow, hWndXL, "XLMAIN", vbNullString)
    'If we got one, increment the count
    If hWndXL > 0 Then
    'This works. We correctly count all _
    instances of Excel
    ExcelInstances = ExcelInstances + 1
    'Here is the problem. The following statement executes and returns a value of _
    -2147467262. xlapp, which is passed by reference to AccessibleObjectFromWindow, _
    is set to nothing. It should be set to the object for Excel.application. _
    I believe that this value is not an object. I tried to reference tmp1. in the _
    immediate window. There was no Intellisense.
    'I think that the function in returning an error value, but I can't figure _
    out what it is. I believe that AccessibleObjectFromWindow returns error _
    values, but I don't know where to find their values so I can interpret the _
    function's results.
    'As best I can tell, the hWndXL parameter is correct. It is the handle for _
    an instance of Excel. OBJID_NATIVEOM is set correctly (see constant declaration _
    above). xlapp is passed by reference as a non-initialized object variable, which _
    will be set by AccessiblObjectFromWindow. IDispatch may be the problem. It is set _
    as shown below in the procedure SetIDispatch(ByRef ID As GUID). This procedure _
    appears to work. I can see that IDispatch is set as I intended and correctly _
    passed to AccessibleObjectFromWindow.
    tmp1 = AccessibleObjectFromWindow(hWndXL, OBJID_NATIVEOM, IDispatch, xlapp)
    'Need to write code to test tmp1 for error. If none, then set objExcelApp = _
    object. Also, I exect xlapp to be set to Excel.application
    End If
    'Loop until we've found them all
    Loop Until hWndXL = 0
    End Function
    Private Sub SetIDispatch(ByRef ID As GUID)
    'Defines the IDispatch variable. The interface _
    ID is {90140000-0016-0409-0000-0000000FF1CE}.
    'NOT USING {00020400-0000-0000-C000-000000000046}, _
    which could be the problem
    '9 is release version - first version shipped (initial release)
    '0 is release type - retail/oem
    '14 is major version
    '0000 is minor version
    '0016 is product ID - MS Excel 2010
    '0409 is language identifier - English
    '0 is x86 or x64 - this is x86
    '000 reserved
    '0 is debug/ship
    '000000FF1CE is office family ID
    With ID
    .lData1 = &H90140000
    .iData2 = &H16
    .iData3 = &H409
    .aBData4(0) = &H0
    .aBData4(1) = &H0
    .aBData4(2) = &H0
    .aBData4(3) = &H0
    .aBData4(4) = &H0
    .aBData4(5) = &HF
    .aBData4(6) = &HF1
    .aBData4(7) = &HCE
    End With
    End Sub
    DaveInCalabasas

    I don't think you can return a reference to Excel's main window like that as you are attempting to do.
    Ref:
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd317978(v=vs.85).aspx 
    It's relatively straightforward to return any workbook's window in any given instance, and in turn it's parent Excel app. Try the following and adapt as required (and include error handling) -
    Option Explicit
    Private Declare Function FindWindowEx Lib "User32" Alias "FindWindowExA" _
    (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, _
    ByVal lpsz2 As String) As Long
    Private Declare Function IIDFromString Lib "ole32" _
    (ByVal lpsz As Long, ByRef lpiid As GUID) As Long
    Private Declare Function AccessibleObjectFromWindow Lib "oleacc" _
    (ByVal hWnd As Long, ByVal dwId As Long, ByRef riid As GUID, _
    ByRef ppvObject As Object) As Long
    Private Type GUID
    Data1 As Long
    Data2 As Integer
    Data3 As Integer
    Data4(7) As Byte
    End Type
    Private Const S_OK As Long = &H0
    Private Const IID_IDispatch As String = "{00020400-0000-0000-C000-000000000046}"
    Private Const OBJID_NATIVEOM As Long = &HFFFFFFF0
    Sub test()
    Dim i As Long
    Dim hWinXL As Long
    Dim xlApp As Object ' Excel.Application
    Dim wb As Object ' Excel.Workbook
    hWinXL = FindWindowEx(0&, 0&, "XLMAIN", vbNullString)
    While hWinXL > 0
    i = i + 1
    Debug.Print "Instance_" & i; hWinXL
    If GetXLapp(hWinXL, xlApp) Then
    For Each wb In xlApp.Workbooks
    Debug.Print , wb.Name
    Next
    End If
    hWinXL = FindWindowEx(0, hWinXL, "XLMAIN", vbNullString)
    Wend
    End Sub
    'Function GetXLapp(hWinXL As Long, xlApp As Excel.Application) As Boolean
    Function GetXLapp(hWinXL As Long, xlApp As Object) As Boolean
    Dim hWinDesk As Long, hWin7 As Long
    Dim obj As Object
    Dim iid As GUID
    Call IIDFromString(StrPtr(IID_IDispatch), iid)
    hWinDesk = FindWindowEx(hWinXL, 0&, "XLDESK", vbNullString)
    hWin7 = FindWindowEx(hWinDesk, 0&, "EXCEL7", vbNullString)
    If AccessibleObjectFromWindow(hWin7, OBJID_NATIVEOM, iid, obj) = S_OK Then
    Set xlApp = obj.Application
    GetXLapp = True
    End If
    End Function
    Note as written if an instance does not have any loaded workbooks a reference will not be returned (though a workbook can be added using DDE, but convoluted!)
    FWIW there are two other very different approaches to grab all running Excel instances though something along the lines of the above is simplest.
    Peter Thornton

  • LR4.1 : "Edit-In" "Open as Smart Object with Photoshop..." feature doesn't work with 32bits

    Hi there,
    I am running LR4.1/CS5/ACR6.7 on a Win7 64bits system.
    The feature "Edit-In" > "Open as Smart Object with Photoshop..." does work Ok with raw files (.NEF).
    However, when i do try to use the same feature with 32 bits .TIFF files (which are output of the LR4.1's "Edit-In" > "Merge to HDR Pro in Photoshop..." other feature), nothing does happen (the Photoshop application windows does open but w.o the image that i've just selected).
    I've used search engines and Adobe online help to see if there was any limit preventing the usage of this feature with 32 bits .TIF files but couldn't see such note.
    Thanks for your help !
    Albert

    Thanks Rikk,
    That did work with a DNG file :-)
    I am working with very huge .TIF files (400MB), so i am wondering if size could be the main issue (although my PC has lots of HW resources).
    I will explore the DNG way, a format which seems anyways to be very promising now with LR4.
    In case anyone has an idea why it doesn't work the .TIF files, please shoot !

Maybe you are looking for

  • Cannot download due to 30 days limitation

    I purchased Photoshop Element 12 and Premier Element 12 on 6 Mar 2014. I downloaded Premier Element 12 subsequently but could not install it due to driver problem with my laptop. As such, I didn't proceed to download my Photoshop Element 12. Today, I

  • Dtexec Version Problem

    Hi everyone, I created a simple SSIS Project in 2012 data tools, which had only a data flow, with one data source, one data conversion and one OLE DB Command. I use the Excel source to pass the columns parameters to an SQL stored procedure. When i ex

  • A Microsoft Software Installer error was encountered.

    Hi All, I installed Hyperion 11.1.2.1 version. but i am getting error when i try to open work bench client as follows: System Error &H80004023 (-2147467229). A Microsoft Software Installer error was encountered. Thanks, mady

  • Program error message

    I've recently installed Elements 12 and have the following problem.    When I open photos in Camera raw, make adjustments and then try to open them I get a message saying the task could not be completed 'Error message'.     On going back to Organizer

  • Noise Reduction and RAW

    I use a Rebel T4i, but the model really should not matter I think. When Hi ISO or Long Exposure Noise Reduction is set does it apply to RAW? I am under the impression that RAW get no additional processing. But I'm learning to look at my images in new