Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19

Thread: Suppressing the Excel dialog for waiting for an OLE action

  1. #1

    Suppressing the Excel dialog for waiting for an OLE action



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi all...

    I have written an application which uses the PDF Creator for creating PDF's.
    The application is loading different Excel files, fills them with some data and then
    puts the output in the PDF Creator's print queue. Then the app merges all single
    PDF's to one PDF. Depending on the users' choice, there are sometimes many PDF's
    to create, for example more than 150 files.

    On some machines, merging the PDF's can take a long time and then Excel displays
    a message "Excel is waiting for another application to complete an OLE action".

    My question: is it possible to hide this message? (as the message is regularly displayed
    until the PDF Creator has finished his job) I tried to use Application.DisplayAlerts, but
    that did not work.

    Thanks in advance for any help and suggestions

    Regards :-)

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,195
    Articles
    57
    Blog Entries
    14
    Hi Mourad,

    I've seen that message before, and I'm not sure if we can actually suppress it or not. I'm not entirely sure that Excel is the owner of the message, (maybe the OS is?) although the wording would lead you to believe so.

    I wonder if, to avoid situations like that, it might be better to combine the files more frequently? Say after every 10 documents merge them, then continue priting more? I don't think it would help the speed (in fact it would probably make it slower) but with less files to work with at a time maybe it would improve the stability?
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3
    It can be suppressed using a bit of Windows API, see:

    http://www.excelforum.com/excel-prog...le-action.html
    Regards,
    Jan Karel Pieterse
    www.jkp-ads.com

  4. #4
    Hi Ken...

    many thanks for your suggestions. In fact, I also do not know if Excel really owns this message; I supposed it. That's a thing, I can try to find out. Thanks also for the idea to split the merging in more parts. I will give a try, however I must then merge that part PDF documents in one document (my customer needs this). Unfortunately the PDF Creator is in my opinion not well documented, perhaps you have a code for this?

    If I let the PDF Creator not merge the documents and I only fill the print queue and then merge the docs manually by using the Print Monitor, then the OLE message does not appear. So I had also the idea to send an API message to the print monitor, I am working on it but not ready yet. If this will work, I think the PDF Creator will be independent from Excel and work in background and make the users' life a little bit easier.

    Best regards :-)

  5. #5
    The message can be suppressed using a windows API call.
    I already posted a reply with a link to a page that shows the solution, but the post is pending approval from an admin.
    Regards,
    Jan Karel Pieterse
    www.jkp-ads.com

  6. #6
    Hi Jan Karel...

    great, thanks. So I will wait until the post is approved

    Best regards :-)

  7. #7
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,195
    Articles
    57
    Blog Entries
    14
    Quote Originally Posted by Jan Karel Pieterse View Post
    I already posted a reply with a link to a page that shows the solution, but the post is pending approval from an admin.
    Grrr.... I'll approve it right now. I need to look into this, as it's not supposed to moderate posts for users with more than 5 posts...
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  8. #8
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,195
    Articles
    57
    Blog Entries
    14
    Okay, approved.

    Now... question... does suppressing the message leave the routine running until it completes? It's not indicating that the "program is not responding" or anything?
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  9. #9
    Hi all...

    many thanks, Jan Karel, a very smart solution. I will try it out and report here about my experience. However this can take some days before I am ready.

    Best regards :-)

  10. #10
    Hi Ken,

    I wouldn't know what effect it has, but I suspect it might leave your code waiting endlessly.
    Regards,
    Jan Karel Pieterse
    www.jkp-ads.com

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •