Hi,
I am working on MFC application that opens excel file in a IE specific file viewer on CHtmlView using navigate method. I have also changed its browserflags and editflag both. but the preview control is still blank. Really appreciate your help.
What I have tried:
DWORD dwValue=0x80000a00;
DWORD dwEdit=0x00010000;
if (RegOpenKey(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes\\Excel.Sheet.12"), &hExcel2k7) == ERROR_SUCCESS)
{
if (RegSetValueEx(hExcel2k7,_T("BrowserFlags"),NULL,REG_DWORD,(PBYTE)&dwValue,sizeof(PDWORD))==ERROR_SUCCESS)
{
if (RegSetValueEx(hExcel2k7,_T("EditFlags"),NULL,REG_DWORD,(PBYTE)&dwEdit,sizeof(PDWORD))==ERROR_SUCCESS)
{
RegCloseKey(hExcel2k7);
}
}
}
if (RegOpenKey(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes\\Excel.Sheet.8"), &hExcel2k7) == ERROR_SUCCESS)
{
if (RegSetValueEx(hExcel2k7,_T("BrowserFlags"),NULL,REG_DWORD,(PBYTE)&dwValue,sizeof(PDWORD))==ERROR_SUCCESS)
{
if(RegSetValueEx(hExcel2k7,_T("EditFlags"),NULL,REG_DWORD,(PBYTE)&dwEdit,sizeof(PDWORD))==ERROR_SUCCESS)
{
RegCloseKey(hExcel2k7);
}
}
}
if (RegOpenKey(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes\\Excel.SheetMacroEnabled.12"), &hExcel2k7) == ERROR_SUCCESS)
{
if (RegSetValueEx(hExcel2k7,_T("BrowserFlags"),NULL,REG_DWORD,(PBYTE)&dwValue,sizeof(PDWORD))==ERROR_SUCCESS)
{
if(RegSetValueEx(hExcel2k7,_T("EditFlags"),NULL,REG_DWORD,(PBYTE)&dwEdit,sizeof(PDWORD))==ERROR_SUCCESS)
{
RegCloseKey(hExcel2k7);
}
}
}
method:
p_RView->Navigate2(pApp->strTargetPath,0,0);
However what registry settings are needed for Office 2021 to make excel documents to open in IE?