Solved

Can I refer two appointmentItem refer to the same outlook calendar folder

Posted on 2002-05-08
2
133 Views
Last Modified: 2010-04-08
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.Application")
Set mNameSpace = objOutlook.GetNamespace("Mapi")

"In sub MySub"

Dim AppItem As Outlook.AppointmentItem
Dim  FilterAppItem  As Outlook.AppointmentItem

 Set AppItem = mNameSpace.GetDefaultFolder(olFolderCalendar).Items()
         Set FilterAppItem = mNameSpace.GetDefaultFolder(olFolderCalendar).Items()


In MySub first line excutes perfectly W/O any problem , but in the second line of code ie

Set FilterAppItem = mNameSpace.GetDefaultFolder(olFolderCalendar).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

0
Comment
Question by:PrashanthKiran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
jessnjeff earned 100 total points
ID: 6997245
appitem & filterappitem must be "items", once you get the items in a folder you can get your individual appointment item
0
 
LVL 8

Expert Comment

by:jessnjeff
ID: 6999700
Dim mItem As outlook.AppointmentItem
Dim mFItem As outlook.AppointmentItem



For Each mItem In AppItem
do my stuff
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't know how to downgrade, my instructions below should be helpful.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question