Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disabling messages when opening Office files (VBA/Excel/Powerpoint/Word)

    Hi guys

    I have the following problem. I am opening office files in order to extract some information from them.
    This process in automatic, and it processes hundred of files.
    The problem that I have, is that with some files, when I open them, I get a popup window asking me for something. Because of that, the automatic processing stops, waiting for the user to select an option.

    Does anybody know how can I skip this confirmation windows? I'm doing an automatic process, and it has no sense that my process stops everytime that office needs to know this.

    Attached is a message that I get with Excel with some files.

    Thanks a lot for your answers
    Attached Images Attached Images

  2. #2
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disabling messages when opening Office files (VBA/Excel/Powerpoint/Wor

    I forgot to say that with some messages, if I do xl.DisplayAlerts = 0 works fine. However, with this window in particular, doesn't work.

  3. #3
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Disabling messages when opening Office files (VBA/Excel/Powerpoint/Wor

    In Excel, just before you open the workbook, insert the line:
    xlApp.DisplayAlerts = False
    Then set it back to true, after the open statement.
    Note, you will need to change xlApp to whatever you call the Excel application object.

    This should also work for Word, but not with Power Point nor Access. Do you have any trouble with these two? HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Disabling messages when opening Office files (VBA/Excel/Powerpoint/Wor

    I also forgot that DisplayAlerts dosn't work, so we're even!
    When you open the Excel workbook, if specify an UpdateLinks:=0 then the prompt should disappear.
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  5. #5
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disabling messages when opening Office files (VBA/Excel/Powerpoint/Wor

    Hi Sam

    Thanks for your answer. I think that we posted at the same time [img]/forums/images/smilies/smile.gif[/img]
    Yes, I tried that but it seems that with that message in particular, doesn't work.

    Do you know if there is other way to skip it?

    Thanks a lot

  6. #6
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disabling messages when opening Office files (VBA/Excel/Powerpoint/Wor

    we did it again! [img]/forums/images/smilies/smile.gif[/img]

    I'm gonna check that. I'll let you know how it goes

    Thanks again!

  7. #7
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disabling messages when opening Office files (VBA/Excel/Powerpoint/Wor

    Sam, it works perfectly.

    Thanks a lot for all your help (not only for this question, you've helped me a lot)

    Take care

  8. #8
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Disabling messages when opening Office files (VBA/Excel/Powerpoint/Wor

    Well, at least this was an easy one! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

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