Re: Duplicating public folder items in personal folders

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks Sue,

My sympathies regarding your glasses.

I've got permissions in both folders, so I don't know if that's the problem.
I'll try what you suggested and see if that helps.

I find Outlooks object model even more confusing than Excel's - I think I
need to buy a book.

Doug

"Sue Mosher [MVP-Outlook]" <suemvp@xxxxxxxxxxxxxxx> wrote in message
news:%23V7ad1KGHHA.1252@xxxxxxxxxxxxxxxxxxxxxxx
Thanks for pointing out where to look for the error. I've been struggling
with a bad eyeglass prescription for 6 weeks now as they try to make one
adjustment after another.

You can't use Copy to copy an item unless you have permission to create new
items in the same parent folder. THe alternative is to create an entirely
new item in the desired target folder and duplicate the property values one
by one.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Doug Glancy" <nobodyhere@xxxxxxxxxxxxxxxx> wrote in message
news:u6cx9cKGHHA.4804@xxxxxxxxxxxxxxxxxxxxxxx

Regarding the error, I listed it in the code where it occurs.

"Sue Mosher [MVP-Outlook]" <suemvp@xxxxxxxxxxxxxxx> wrote in message
news:OMyDRLKGHHA.1240@xxxxxxxxxxxxxxxxxxxxxxx
Yes, it's possible, but not a simple application by any means. Tom Howe's
Enterprise Calendar sample would be a good starting point; see
http://www.slipstick.com/calendar/scheduleall.htm


"Doug Glancy" <nobodyhere@xxxxxxxxxxxxxxxx> wrote in message
news:eKsX$1JGHHA.1468@xxxxxxxxxxxxxxxxxxxxxxx
(I've never cross-posted before, but I'm new to the Outlook newsgroups,
and
thought I might get a more complete answer in this group than to my post
to
another yesterday)

At my office we are in need of a system to remind individuals of upcoming
deadlines. We want to centralize the input of the deadlines and to be
able
to set reminders on different deadliines for different individuals.

We are using Exchange 2003, Outlook 2003 and we use Cached Exchange mode.

Through googling various options, it seems like it's possible to create a
system with these features.

- One public calendar with all the deadlines
- Personal copies of the calendar on multiple individuals' computers
- copying, modifying or deleting items from the public calendar to
individuals' based on events in the public folder
- reminders set based on whether the individuals username is a checked
category

I'd be interested in opinions on whether this is workable, and if so, if
there are any examples of the code needed.

If this is workable, I have a specific problem (first of many, I'm sure).
I
wrote ApplicationStartup code to set the items in the public calendar so
I
could capture the its events and that's working. I then wrote some
simple
Item_Add event code to copy the added event to my personal calendar. It
works if I set a breakpoint and step through. When run without a
breakpoint, the item is copied but then I get an error. My wild guess is
there is some problem with lag time or cached Exchange mode. I also
thought
maybe the fact that the code first adds another copy to the public folder
was the problem, but I can't tell. In Excel VBA I would try turning off
events, but I can't find a way to code that in Outlook.

Here's the code:

Private Sub myOlItems_ItemAdd(ByVal Item As Object)
Dim calendar_item As AppointmentItem
' on next line I get the message
' "Method copy of object AppointmentItem Failed
Set calendar_item = Item.Copy
calendar_item.Move
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Folders("schedule
- Doug's test")
Set calendar_item = Nothing
End Sub

Again, the code works, it actually copies the added item from the Public
folder to mine, but then I get the error and message, which makes me
think
that it's the 2nd time through. But if I set a breakpoint beforehand, it
only goes through once.




.



Relevant Pages

  • Re: Duplicating public folder items in personal folders
    ... THe alternative is to create an entirely new item in the desired target folder and duplicate the property values one by one. ... Sue Mosher, Outlook MVP ... We want to centralize the input of the deadlines and to be ... modifying or deleting items from the public calendar to ...
    (microsoft.public.outlook.program_vba)
  • Re: Export Exchange Public Calendar
    ... If you want to write Outlook object model code to iterate the folder, ... > How can I open a connection to an Exchange Public Calendar? ...
    (microsoft.public.outlook.program_vba)
  • Re: Outlook displays two identical Personal Folders
    ... Create a new mail profile and point it to reuse your current active .pst ... Milly Staples [MVP - Outlook] ... ||| Folder in the folder list. ...
    (microsoft.public.outlook.installation)
  • Re: Export Exchange Public Calendar
    ... > give you other ideas on how to work with databases and Outlook together. ... > If you want to write Outlook object model code to iterate the folder, ... >> How can I open a connection to an Exchange Public Calendar? ...
    (microsoft.public.outlook.program_vba)
  • Re: WTF is right with OE? and how to remove it. LONG!
    ... > you an SASE for a photo of those instructions. ... The instructions say Windows 2000, this works for XP as well just substitute ... the Windows folder for the Winnt folder used in the instructions. ... Outlook Express 5.x and 6.0 on a computer that is running Microsoft Windows ...
    (news.software.readers)