Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use of GetSaveAsFilename causes error in 2007 (2007)

    in a com addin catching the saveas event of excel we are forcing the extension to be .xls or .xlt as shown. Saving excel workbook in 2007 corrupts the excel workbook and cannot be opened by anything. How do I format this GetSaveAsFilename function to display all the 2007 file formats? Thank you!

    Excel.Workbook.GetSaveAsFilename(NewFileName) ', " Microsoft Excel Workbook (*.xls), *.xls, Template (*.xlt), *.xlt")

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Use of GetSaveAsFilename causes error in 2007 (2007)

    According to this, the fileformat parameter must match the file extension when you perform the SaveAs.
    HTH
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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