Personal Calendar Item copied to a selected public folder calendar

W

Wanda

Hi:

Have created this code to allow me to select a folder I want to put my send
mail item in or if I don't want it in a specific folder, I hit "cancel" and
it puts it in my Send Folder.
***********
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim objNS As NameSpace
Dim objFolder As MAPIFolder

If Not Autoforward Then

Set objNS = Application.GetNamespace("MAPI")
Set objFolder = objNS.PickFolder

If TypeName(objFolder) <> "Nothing" Then
Set Item.SaveSentMessageFolder = objFolder
End If

Set objFolder = Nothing
Set objNS = Nothing
End If
Autoforward = False
End Sub
**************

Now what I want to do is when I put an appointment in my calendar, I want
that same popup selection to allow me to COPY that appointment into another
selected calendar (public folder calendar). Is this possible? Thanks.

Wanda
 
S

Sue Mosher [MVP-Outlook]

Yes, it's possible, but would use a completely different event -- MAPIFolder.Items.ItemAdd. The sample code at http://www.outlookcode.com/codedetail.aspx?id=456 demonstrates how it works for Sent Items, so you should be able to adapt that.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top