locked
powershell -- how do I programmatically close an excel dialog box? RRS feed

  • Question

  • 
    Sorry, I didn't see a Powershell forum per se.  I'm trying to figure out how to programmatically close an excel dialog box that appears when I close an excel workbook.
    
    # create an instance of excel
    $a = New-Object -comobject Excel.Application
    
    
    # make it visible
    $a.Visible = $True
    
    
    # open  workbook 
    $b = $a.Workbooks.Open("filename.xlsx")
    
    There are a number of steps following, then I manually copy some data from the workbook.
    
    # close the workbook, saving changes
    $b.Close($true)
    
    This is the point where the dialog appears that I want to close programmatically.

    How do I close the dialog box programmatically?

    Monday, November 23, 2020 7:30 PM

Answers

  • forum migrated to mentioned below link please use this

    https://docs.microsoft.com/en-us/answers/index.html

     hope answer the question if issue resolve please accept answer
    Monday, November 23, 2020 7:52 PM

All replies

  • forum migrated to mentioned below link please use this

    https://docs.microsoft.com/en-us/answers/index.html

     hope answer the question if issue resolve please accept answer
    Monday, November 23, 2020 7:52 PM
  • Thanks for pointing me in the right direction

    Be safe

    Christian

    Tuesday, November 24, 2020 12:55 PM