Solved

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

Posted on 2002-05-08
2
131 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
  • 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…

805 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