Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Copy Outlook Calendar to Excel.

  1. #11

    Error on Created Personal Calendar



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Quote Originally Posted by Ken Puls View Post
    Hmm... this is weird... I'm actually able to use:
    • kpuls
    • Ken Puls

    So it looks like it's pretty robust here... Do any of those formats work for you or none?

    "I love your app, but I'm haivng the same problem as stated above. I am able to generate my own calendar but receive the folloowing error when trying to attach to a created calendar within Outlook.

    Quote Originally Posted by Simi View Post
    I was trying to use the sheet you supplied, to try and understand how it works.
    However I keep getting an error on this line.

    Set myCalItems = olNS.GetSharedDefaultFolder(objRecipient, 9).Items '9=olFolderCalendar

    I am guessing it is an error on my part not putting the right name for my mailbox.
    So to help me understand what my mailbox is called, is it the name of the .pst file?
    Where can I check what the name of the mailbox is?

    As a side note, I am using 2007.

    Thank you for your help and I hope you have fun at the Microsoft MVP Summit.
    "

    Thanks for the app... and the help



  2. #12
    I am having a similar problem with trying to attach to a calendar within my primary Outlook account. The calendar is name Staff Absences but when I try to attach to it, I get the same error.

    Set myCalItems = olNS.GetSharedDefaultFolder(objRecipient, 9).Items '9=olFolderCalendar

    Is it possible to attach to a subcalendar (or created one). I have shared the calendar but it will not attach to it with your app.

    I love your app.

  3. #13
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    1,601
    Articles
    100
    Blog Entries
    14
    So, just to be clear here, you have a primary calendar under your name in Outlook, but this is a shared calendar that you're attaching to. Did I get that right?
    Ken Puls, CMA, MS MVP (Excel)

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  4. #14
    Yes, my primary calendar is under my email and your app works fine with that one. When I tried to attach to the Calendar named Staff Attendance it gives me that error.

    thx
    Brian

  5. #15
    Super Moderator Zack Barresse's Avatar
    Join Date
    Mar 2011
    Location
    Boardman, Oregon, United States
    Posts
    62
    Articles
    0
    A sub-calendar is a calendar within a calendar. I can't test on the machine I'm on, but I believe it goes like this ...

    Code:
    Set myCalItems = olNS.GetSharedDefaultFolder(objRecipient, 9).Folder("Staff Attendance").Items
    HTH
    Regards,
    Zack Barresse

  6. #16
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    1,601
    Articles
    100
    Blog Entries
    14
    Oh man, Zack, thanks for picking this up. I had it bookmarked, and never got back to it.
    Ken Puls, CMA, MS MVP (Excel)

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  7. #17
    Super Moderator Zack Barresse's Avatar
    Join Date
    Mar 2011
    Location
    Boardman, Oregon, United States
    Posts
    62
    Articles
    0
    Glad I saw it!! Was sitting in my inbox when I was cleaning house.
    Regards,
    Zack Barresse

  8. #18
    Thanks for such a quick reply. I did make the change b ut I am still getting the error. I have attached a copy of the error screen and a copy of my outlook folders. I really do appreciate yo
    Click image for larger version. 

Name:	Error.jpg 
Views:	32 
Size:	91.4 KB 
ID:	583ur help with this because I love the app.

  9. #19
    Super Moderator Zack Barresse's Avatar
    Join Date
    Mar 2011
    Location
    Boardman, Oregon, United States
    Posts
    62
    Articles
    0
    I would use a couple of variables (you could do this with one, but easier to read with two)...

    Code:
        Set oFolder = olNS.GetDefaultFolder(9)
        Set oSubFolder = oFolder.Folders("Staff Attendance")
    Both variables would need to be declared as Objects, just as the others were. Then you would change the line setting the myCalItems to...
    Code:
        Set myCalItems = oSubFolder.Items
    HTH
    Regards,
    Zack Barresse

  10. #20


    Register for a FREE account, and/
    or Log in to avoid these ads!

    thanks a lot. It worked perfectly....

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •