Solved

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

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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…

630 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