PrashanthKiran
asked on
Can I refer two appointmentItem refer to the same outlook calendar folder
HI,
Can I refer two appointmentItem refer to the same outlook calendar folder
I have code something like this
"general declaration "
Public objOutlook As Outlook.Application
Dim mNameSpace As Outlook.NameSpace
"In form load "
Set objOutlook = CreateObject("Outlook.Appl ication")
Set mNameSpace = objOutlook.GetNamespace("M api")
"In sub MySub"
Dim AppItem As Outlook.AppointmentItem
Dim FilterAppItem As Outlook.AppointmentItem
Set AppItem = mNameSpace.GetDefaultFolde r(olFolder Calendar). Items()
Set FilterAppItem = mNameSpace.GetDefaultFolde r(olFolder Calendar). Items()
In MySub first line excutes perfectly W/O any problem , but in the second line of code ie
Set FilterAppItem = mNameSpace.GetDefaultFolde r(olFolder Calendar). Items()
It throws an error "Run time Error 13 Type mismatch"
Can any one tells the reason for this.
If this is not correct, How to iterate in the AppointmentItems
TIA
Prashanth Kiran G
Can I refer two appointmentItem refer to the same outlook calendar folder
I have code something like this
"general declaration "
Public objOutlook As Outlook.Application
Dim mNameSpace As Outlook.NameSpace
"In form load "
Set objOutlook = CreateObject("Outlook.Appl
Set mNameSpace = objOutlook.GetNamespace("M
"In sub MySub"
Dim AppItem As Outlook.AppointmentItem
Dim FilterAppItem As Outlook.AppointmentItem
Set AppItem = mNameSpace.GetDefaultFolde
Set FilterAppItem = mNameSpace.GetDefaultFolde
In MySub first line excutes perfectly W/O any problem , but in the second line of code ie
Set FilterAppItem = mNameSpace.GetDefaultFolde
It throws an error "Run time Error 13 Type mismatch"
Can any one tells the reason for this.
If this is not correct, How to iterate in the AppointmentItems
TIA
Prashanth Kiran G
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim mFItem As outlook.AppointmentItem
For Each mItem In AppItem
do my stuff