Menu

#4 Run-time error '13': Type mismatch

open
nobody
None
5
2006-08-01
2006-08-01
Anonymous
No

Error on "Next item" line of the following function in
frmSaveiCalStep2. No selection of categories has
occured...this is approx 15 seconds after selecting the
default calendar file.

Private Sub UserForm_Activate()

Dim myNameSpace As Variant
Dim myCalendar As Variant
Dim myitems As Variant
Dim item As AppointmentItem

'Unfortunately, it appears there isn't a way to get
a list of categories.
'Search through the appt. items and generate a list
of categories.

Set myNameSpace = GetNamespace("MAPI")
Set myCalendar = get_calendar
Set myitems = myCalendar.Items
myitems.IncludeRecurrences = True 'This ensures
that recurring appts are fully included

ReDim catlist(0 To 0) As String
Dim numcat As Integer

catlist(0) = "" 'This is for the case
where no category has been selected
numcat = 1

For Each item In myitems
If Not category_found(catlist, item.Categories)
Then

'Add the category to the list
ReDim Preserve catlist(0 To numcat) As String
catlist(numcat) = item.Categories
numcat = numcat + 1

End If
Next item

Discussion

  • Nobody/Anonymous

    Logged In: NO

    get the samething

     
  • Nobody/Anonymous

    Logged In: NO

    same here.

     
  • Nobody/Anonymous

    Logged In: NO

    I'm getting the same error. I was wondering if it might be due to the fact that in the references, I don't have the option of selecting "Microsoft Outlook 11.0 Object Library" only 10.0, and same for "Microsoft Word 10.0 Object Library"

    If you know how to fix this, I'd love to hear: carolinejk[at]gmail[dot]com

     
  • Nobody/Anonymous

    I get the same error. I use the references exactly as listed. So that isn't the problem.

     
  • Joe Dix

    Joe Dix - 2009-01-15

    Try this link instead. This worked for me very easily but I have Outlook 2007 and I am not positive that this will work with any other version. Hope this helps my peeps...

    http://www.jakeludington.com/outlook/20071112_save_your_outlook_calendar_as_ical.html

     

Log in to post a comment.

MongoDB Logo MongoDB