Sue Mosher [MVP-Outlook] ha scritto:
It looks to me like you're making this too hard. Your code gets the IDs from the current folder, then gets the same current folder again using GetFolderFromID. Why not cut out the extra steps and just use:
pippo = CurExplorer.CurrentFolder.Items
I've never heard of or seen a blank StoreID for any store.
I try to explain:
1) I activate an event trigger with "pippo" on the current folder
2) If the user changes the current folder I have to redirect "pippo" on
an other folder so I have an event trigger also on CurExplorer the
trigger starts when the user change folder better the folder is
activated (from "Sent mail" to "incoming" and so on)
3) the istruction : CurFldName = CurExplorer.CurrentFolder.Name is only
a debug I want to see the name of the new selected folder
4) to redirect pippo on the new folder items, with events, I have to use
the istruction :
pippo = Me.Application.GetNamespace("MAPI"). _
GetFolderFromID(CurEntryId, CurStoreId).Items
now I have 2 email account on my outlook:
1)
2)
with the first one is ALL ok
CurFldName = "sent email"
pippo detect event on this folder
the problem is on the IMAP account
CurFolder is correct
but
CurFldPath = CurExplorer.CurrentFolder.Store.FilePath
is empty
thanks for the anwer
Alberto