E
elziko
Everytime I use this code:
Dim objOutlook As New Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objJournalEntry As Outlook.JournalItem =
DirectCast(objOutlook.CreateItem(Outlook.OlItemType.olJournalItem),
Outlook.JournalItem)
objJournalEntry.Subject = "TEST!"
objNameSpace = objOutlook.GetNamespace("MAPI")
objFolder =
objNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderJournal)
objFolder.Items.Add(objJournalEntry)
To create a new Journal item I get the following exception:
An unhandled exception of type 'System.ArgumentException' occurred in
WindowsApplication4.exe
Additional information: Could not complete the operation. One or more
parameter values are not valid.
I'm using the Outlook 10.0 object model.
Anyone know what I'mm doing wrong. Are there some properties of a
JournalItem that MUST be completed before adding?
Dim objOutlook As New Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objJournalEntry As Outlook.JournalItem =
DirectCast(objOutlook.CreateItem(Outlook.OlItemType.olJournalItem),
Outlook.JournalItem)
objJournalEntry.Subject = "TEST!"
objNameSpace = objOutlook.GetNamespace("MAPI")
objFolder =
objNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderJournal)
objFolder.Items.Add(objJournalEntry)
To create a new Journal item I get the following exception:
An unhandled exception of type 'System.ArgumentException' occurred in
WindowsApplication4.exe
Additional information: Could not complete the operation. One or more
parameter values are not valid.
I'm using the Outlook 10.0 object model.
Anyone know what I'mm doing wrong. Are there some properties of a
JournalItem that MUST be completed before adding?