is this code correct to create a new post item...
sfilepath=@""C:\Documents and Settings\example.msg";
Outlook._PostItem omail = (Outlook._PostItem)olApp.CreateItemFromTemplate(sfilepath,Type.Missing);
am new to this and mainly doesnot know the difference between mailitem and postitem..but when i create a mailitem the code rus successfully.But when using postitem it shows the below exception..
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook._PostItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063024-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
So then how can i create a postitem ???