M
Michael Howes
I generate some Excel files from C# code.
I turn track changes on (why do I have to share an Excel file to turn
on track changes??!). Everything works fine on my machine (Excel 2003
SP2) but Track Changes is not on (the file is shared) on another machine
which has Excel 2003 with no service packs.
any ideas of changes in the API between the initial release of 2003
and SP2?
my code
excelApp.Workbooks[1].SaveAs(FullPath,
Excel.XlFileFormat.xlWorkbookNormal, Type.Missing, Type.Missing,
Type.Missing, Type.Missing,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing);
if (OctetUtils.m_bPart11Compliant)
{
excelApp.Workbooks[1].KeepChangeHistory = true;
object oWho = "Everyone";
excelApp.Workbooks[1].HighlightChangesOptions(Excel.XlHighlightChangesTime.xlAllChanges,
oWho, Type.Missing);
excelApp.Workbooks[1].ListChangesOnNewSheet = true;
excelApp.Workbooks[1].HighlightChangesOnScreen = true;
File.SetAttributes(FullPath, FileAttributes.ReadOnly);
}
thanks
mike
I turn track changes on (why do I have to share an Excel file to turn
on track changes??!). Everything works fine on my machine (Excel 2003
SP2) but Track Changes is not on (the file is shared) on another machine
which has Excel 2003 with no service packs.
any ideas of changes in the API between the initial release of 2003
and SP2?
my code
excelApp.Workbooks[1].SaveAs(FullPath,
Excel.XlFileFormat.xlWorkbookNormal, Type.Missing, Type.Missing,
Type.Missing, Type.Missing,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing);
if (OctetUtils.m_bPart11Compliant)
{
excelApp.Workbooks[1].KeepChangeHistory = true;
object oWho = "Everyone";
excelApp.Workbooks[1].HighlightChangesOptions(Excel.XlHighlightChangesTime.xlAllChanges,
oWho, Type.Missing);
excelApp.Workbooks[1].ListChangesOnNewSheet = true;
excelApp.Workbooks[1].HighlightChangesOnScreen = true;
File.SetAttributes(FullPath, FileAttributes.ReadOnly);
}
thanks
mike