I am creating an Excel File through code, but when I try to open the file, I
always get the following message:
<File name> should be opened as read-only unless you need to save changes to
it. Open as read-only?
KB Article 181688 Mentions this problem:
http://support.microsoft.com/default.aspx?scid=kb;en-us;181668
I am using ReadWrite as my ReadOnlyRecommended Property in the SaveAs Method
of the WorkBook, but am still getting this error.
oXLWb.SaveAs(FileName, Excel.XlFileFormat.xlExcel7, Type.Missing,
Type.Missing, Excel.XlFileAccess.xlReadWrite, Type.Missing,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
Let me know if you have any suggestions,
Thanks,
Aric Levin
"Peter Huang" - 25 Oct 2004 02:38 GMT
Hi Aric,
First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you get the error msg when you
open the file with automation excel, after you tried the suggestion in the
KB article, you can get through the open step without error message, but
when you saveas the file you get the error again.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.
Now I think you may try to open another excel file to see if the problem
persists with all the excel file even a new created excel.
What version of the excel you are using? What version of the excel file you
are testing on?
You may perform the steps so that we can isolate the problem more quickly.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.