Hi
i want a piece of code to create these 2 folders in Outlook
i want a piece of code to create these 2 folders in Outlook
Options and the Mail Folder in Options
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options]
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\Mail]
"AllowTNEFtoCreateProps"=dword:00000000
"AllowMSGFilestoCreateProps"=dword:00000001
Roei BarPosted Aug 3, 2009, 3:17 AM
enjoy
class Program
{
static void Main(string[] args)
{
Microsoft.Win32.RegistryKey subKey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Office");
if (checkIfKeyExists(subKey))
{
subKey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Office\\11.0");
if (checkIfKeyExists(subKey))
{
subKey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Office\\11.0\\Outlook\\Options");
if (!checkIfKeyExists(subKey))
{
Microsoft.Win32.Registry.LocalMachine.CreateSubKey("Software\\Microsoft\\Office\\11.0\\Outlook\\Options");
}
subKey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Office\\11.0\\Outlook\\Options\\Mail");
if (!checkIfKeyExists(subKey))
{
Microsoft.Win32.Registry.LocalMachine.CreateSubKey("Software\\Microsoft\\Office\\11.0\\Outlook\\Options\\Mail");
}
Microsoft.Win32.Registry.LocalMachine.SetValue("AllowTNEFtoCreateProps", "00000000", RegistryValueKind.DWord);
Microsoft.Win32.Registry.LocalMachine.SetValue("AllowMSGFilestoCreateProps", "00000001", RegistryValueKind.DWord);
}
}
}
private static bool checkIfKeyExists(Microsoft.Win32.RegistryKey subKey)
{
bool status = true;
if (subKey == null)
{
status = false;
}
return status;
}
}
faraz akramPosted Aug 3, 2009, 7:53 AM
faraz akramPosted Aug 3, 2009, 4:49 AM