Folder move event

Status
Not open for further replies.
A

Ashish

Folder move event does not give the correct path for folder name.

Suppose there is a under Inbox say inbox_Child.

In outlook when i move inbox_Child under draft folder then item_add event is

called which shows the path for inbox_Child as Inbox/inbox_Child(paren name

of inbox_Child is Inbox, it's not Drafts). While it should give

Drafts/inbox_Child.

Is there any way to get correct path.
 
There is no Folder.Move() event, what event are you talking about? What

version of Outlook? Please post enough specific information so someone can

answer your question.

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:%23Ij4Ehl7JHA.1372@TK2MSFTNGP05.phx.gbl...
> Folder move event does not give the correct path for folder name.
> Suppose there is a under Inbox say inbox_Child.
> In outlook when i move inbox_Child under draft folder then item_add event
> is called which shows the path for inbox_Child as Inbox/inbox_Child(paren
> name of inbox_Child is Inbox, it's not Drafts). While it should give
> Drafts/inbox_Child.
> Is there any way to get correct path.
>
 
sorry for mistake.

In outlook, When i move a folder from one folder to another folder then

following events called

folder_change and folder_add.

But folder_add does not show correct path for new folder.

Suppose under Inbox there is a folder "inbox_child".

When i move "inbox_child" under Drafts folder then folder_add events shows

following path for "inbox_child"

Inbox/inbox_child (i find this path by getting parent folder name of

"inbox_child", here "inbox_child" is argument in folder_add(mapifolder

inboxchildfolder)

While the path should be Drafts/inbox_child because "inbox_child" is moved

under Drafts oflder.

Is there some way to get the correct path.
<kenslovak@mvps.org> wrote in message

news:%23SWPMHo7JHA.6004@TK2MSFTNGP02.phx.gbl...
> There is no Folder.Move() event, what event are you talking about? What
> version of Outlook? Please post enough specific information so someone can
> answer your question.

> >

>

> "Ashish" <akohli_2004@hotmail.com> wrote in message
> news:%23Ij4Ehl7JHA.1372@TK2MSFTNGP05.phx.gbl...
> > Folder move event does not give the correct path for folder name.
> > Suppose there is a under Inbox say inbox_Child.
> > In outlook when i move inbox_Child under draft folder then item_add event
> > is called which shows the path for inbox_Child as Inbox/inbox_Child(paren
> > name of inbox_Child is Inbox, it's not Drafts). While it should give
> > Drafts/inbox_Child.
> > Is there any way to get correct path.
> >

>
 
The Folders.FolderAdd() event passes you the MAPIFolder instance that is

being added to that Folders collection. Keep that MAPIFolder reference and

find it after the event finishes, at which point the folder path should be

correct.

You still don't mention what version of Outlook you are targeting, but if it

is Outlook 2007 you might be better served by the Folder.BeforeFolderMove()

event, which provides a MoveTo Folder object that should have the correct

path (if the Folder is null the folder is being deleted). Folder is the new

super-object that subsumes the MAPIFolder object, but it and that event are

only available in Outlook 2007.

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:OXBbpdx7JHA.5780@TK2MSFTNGP04.phx.gbl...
> sorry for mistake.
> In outlook, When i move a folder from one folder to another folder then
> following events called
> folder_change and folder_add.
> But folder_add does not show correct path for new folder.

> Suppose under Inbox there is a folder "inbox_child".
> When i move "inbox_child" under Drafts folder then folder_add events shows
> following path for "inbox_child"
> Inbox/inbox_child (i find this path by getting parent folder name of
> "inbox_child", here "inbox_child" is argument in folder_add(mapifolder
> inboxchildfolder)

> While the path should be Drafts/inbox_child because "inbox_child" is moved
> under Drafts oflder.

> Is there some way to get the correct path.
 
I'm using outlook 2003.


> Keep that MAPIFolder reference and find it after the event finishes, at
> which point the folder path should be correct.


If i keep Mapifolder reference then in which event/function i should find

it? After Folder_Add event folder_change event is not called for new folder

( Drafts folder where i moved a folder).
<kenslovak@mvps.org> wrote in message

news:OUgGF517JHA.4116@TK2MSFTNGP04.phx.gbl...
> The Folders.FolderAdd() event passes you the MAPIFolder instance that is
> being added to that Folders collection. Keep that MAPIFolder reference and
> find it after the event finishes, at which point the folder path should be
> correct.

> You still don't mention what version of Outlook you are targeting, but if
> it is Outlook 2007 you might be better served by the
> Folder.BeforeFolderMove() event, which provides a MoveTo Folder object
> that should have the correct path (if the Folder is null the folder is
> being deleted). Folder is the new super-object that subsumes the
> MAPIFolder object, but it and that event are only available in Outlook
> 2007.

> >

>

> "Ashish" <akohli_2004@hotmail.com> wrote in message
> news:OXBbpdx7JHA.5780@TK2MSFTNGP04.phx.gbl...
> > sorry for mistake.
> > In outlook, When i move a folder from one folder to another folder then
> > following events called
> > folder_change and folder_add.
> > But folder_add does not show correct path for new folder.
>

>> Suppose under Inbox there is a folder "inbox_child".
> > When i move "inbox_child" under Drafts folder then folder_add events
> > shows following path for "inbox_child"
> > Inbox/inbox_child (i find this path by getting parent folder name of
> > "inbox_child", here "inbox_child" is argument in folder_add(mapifolder
> > inboxchildfolder)
>

>> While the path should be Drafts/inbox_child because "inbox_child" is
> > moved under Drafts oflder.
>

>> Is there some way to get the correct path.

>
 
Use a timer to set up the polling for that. In that event handler set a

boolean flag and initialize the timer, when it fires do what you have to do.

Persist that MAPIFolder reference so you can use it in the timer event.

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:%23154I197JHA.1432@TK2MSFTNGP02.phx.gbl...
> I'm using outlook 2003.
>
> >Keep that MAPIFolder reference and find it after the event finishes, at
> >which point the folder path should be correct.


> If i keep Mapifolder reference then in which event/function i should find
> it? After Folder_Add event folder_change event is not called for new
> folder ( Drafts folder where i moved a folder).
 
hello,

I have some issue related to the mail which is movd from one folder

to another. I use vsto 2005 and my target application is outlook 2007. As

soon as the mail comes to outlook, i read its contents like 'to address',

'from address', etc and generate a uniqueID and call a webservice to insert a

record into the database.

Basing on the 'Rules and Alerts' specified, the mail goes to custom

folder. The problem is I am unable to assign that uniqueID to UserProperty of

the mail in the destination custom folder.

I would be thankful to the people who help me.

Thanks & Regards,

Varma
wrote:


> Use a timer to set up the polling for that. In that event handler set a
> boolean flag and initialize the timer, when it fires do what you have to do.
> Persist that MAPIFolder reference so you can use it in the timer event.

> >

>

> "Ashish" <akohli_2004@hotmail.com> wrote in message
> news:%23154I197JHA.1432@TK2MSFTNGP02.phx.gbl...
> > I'm using outlook 2003.
> >
> >>Keep that MAPIFolder reference and find it after the event finishes, at
> >>which point the folder path should be correct.

> > If i keep Mapifolder reference then in which event/function i should find
> > it? After Folder_Add event folder_change event is not called for new
> > folder ( Drafts folder where i moved a folder).


>
 
Show the code you're using (and don't hijack other people's threads).

"Problem with UserProperty of mail object" <Problem with UserProperty of

mail object> wrote in message

news:9905CD64-B778-4D13-888B-D1B4808A278B@microsoft.com...
> hello,

> I have some issue related to the mail which is movd from one
> folder
> to another. I use vsto 2005 and my target application is outlook 2007.
> As
> soon as the mail comes to outlook, i read its contents like 'to address',
> 'from address', etc and generate a uniqueID and call a webservice to
> insert a
> record into the database.

> Basing on the 'Rules and Alerts' specified, the mail goes to custom
> folder. The problem is I am unable to assign that uniqueID to UserProperty
> of
> the mail in the destination custom folder.

> I would be thankful to the people who help me.

> Thanks & Regards,
> Varma
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
K VBA BeforeItemMove event create rule to always move to its folder. Outlook VBA and Custom Forms 4
A Search folder and move the email Outlook VBA and Custom Forms 0
A Outlook 365 (OutLook For Mac)Move "On My Computer" Folder Items From Old To New Mac Computer Using Outlook 3
HarvMan Outlook 365 - Rule to Move an Incoming Message to Another Folder Using Outlook 4
J Quick steps delete original email and move reply/sent email to folder Using Outlook 2
NVDon Create new Move To Folder list Outlook VBA and Custom Forms 0
P Print attachments automatically and move the mail to an existing folder called "Ted" Outlook VBA and Custom Forms 4
T Macro to move reply and original message to folder Outlook VBA and Custom Forms 6
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
D Move Email with Attachment to Folder Outlook VBA and Custom Forms 3
M Move to Folder Using Outlook 1
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
A Create date folder and move messages daily Outlook VBA and Custom Forms 1
C Can't move folder, the folder is full Using Outlook 0
O Rule to move (specific) messages from Sent folder to Specific folder Using Outlook 1
P when i move inbox mails to another folder in outlook the mail disappears Using Outlook 1
E Search for folder by key in subject then move new message to related folder Outlook VBA and Custom Forms 1
B Macro to manually move selected emails to network folder Outlook VBA and Custom Forms 1
L Making rule to move email to folder from one O365 domain Using Outlook 1
M code to move selected Outlook contacts to another folder Using Outlook 3
Mark White VBScript Move sent mail to non-default folder Outlook VBA and Custom Forms 5
Mark White VBScript Move sent mail to non-default folder Outlook VBA and Custom Forms 0
M Move new mail to folder based on sender address Outlook VBA and Custom Forms 2
D Help with code to move mail on receipt to another folder based on time received Outlook VBA and Custom Forms 2
S VBA Code to move mail items from search folder to inbox subfolder Outlook VBA and Custom Forms 4
F Move mails from Deleted Items folder back to its original folder where the mails got deleted Using Outlook 0
S Auto move search results to folder Outlook VBA and Custom Forms 0
K VBA to move emails in folder to a windows folder Outlook VBA and Custom Forms 2
S VBA to search a keyword in attachment and move to a folder Outlook VBA and Custom Forms 0
mrmmickle1 UserProperties VBA to move message to another folder Outlook VBA and Custom Forms 7
O How to move contacts folder image of a drive Using Outlook 1
Y Move new messages to personal folder which already contains this conversation Outlook VBA and Custom Forms 1
P Move email to folder Using Outlook 1
P move a specified email "From" tag items to a certain folder whenever there is "New Mail" in the inbo Outlook VBA and Custom Forms 5
M Move Sent Items from server folder to personal folder Using Outlook 2
V move emails to windows folder and show sender details Using Outlook 7
B "Your IMAP server wants to alert you to the following: cannot move folder into itself" Using Outlook 3
E Outlook 2007: Problem with "Move to Folder >" button on toolbar Using Outlook 6
Douglas Littlefield Macro to move mail from inbox to Managed Folder Exchange Server Administration 1
M Automatically move Outlook message to the specific folder when click on reply to all Using Outlook 4
H Move outlook emails >90 days to shared drive (Desktop) Folder Outlook VBA and Custom Forms 5
O Script to move emails to a folder based on various possible keywords Outlook VBA and Custom Forms 11
S how to keep "To" when move sent emails to other folder Using Outlook 1
T Messages no longer move to quote folder on shared mailbox after user adds -D to folder name Outlook VBA and Custom Forms 1
L Macro Move E-mail attachments to a PC Folder Using Outlook 16
G Macro to move sent items from local folder to IMAP folder Using Outlook 4
L Move Contacts to a Folder Using Outlook 2
L Move E-Mails to Another Folder Using Outlook 66
N rule to move sent mail to the deleted folder in outlook Using Outlook 4
D Move email to same folder as the rest of the conversation Using Outlook 1

Similar threads

Back
Top