Saving an Item to multiple folders

D

DawnTreader

Hello All

i have a custom form that i have at least 2 places i would like it saved to.
so when the user saves the form i want it to be saved in their personal
folder and a copy of that to be saved in to a public folder.

is this possible?

i know how to get an item to be created into a certain folder, now i just
need to get an idea of how to do this.

any and all help appreciated.
 
K

Ken Slovak - [MVP - Outlook]

Sure you can do that.

If you trap the Item_Write event (when and item is saved) you know it's
being saved in a default location. So all you need to do is to use that
event, get a handle to the desired location and then use Item.Copy to get a
copy of that item as a new object, then use the Move method on that new
item. So that code would look something like this:

Dim oCopy
Dim oMove

Set oCopy = Item.Copy

' oFolder is your target folder
Set oMove = oCopy.Move(oFolder)
 

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