Dale James
asked on
How to link to MS Access to Outlook Custom Search Box
Hello Team
I have a MS Access database that links to multiple outlook folders.
One of the folders that I would like to link to is a custom search folder (Emails Per Day) that captures and counts how many emails are received into my mailbox each day.
When attempting to link my MS Access database, I can't find the custom search folder I created.
I am thinking that it may not be possible to link to it as it is not visible on the Import\Exchange Outlook Wizard in MS Access.
Can you please advise if it is not possible to directly link via the wizard, is there anyway around this, e.g., VBA?
Thanks in advance to any responses received.
Sincerely
Dale
I have a MS Access database that links to multiple outlook folders.
One of the folders that I would like to link to is a custom search folder (Emails Per Day) that captures and counts how many emails are received into my mailbox each day.
When attempting to link my MS Access database, I can't find the custom search folder I created.
I am thinking that it may not be possible to link to it as it is not visible on the Import\Exchange Outlook Wizard in MS Access.
Can you please advise if it is not possible to directly link via the wizard, is there anyway around this, e.g., VBA?
Thanks in advance to any responses received.
Sincerely
Dale
ASKER
Hello Daniel
Thank you very much for providing the above code.
I placed the code in an Access module with the code to be triggered by a Command Click. When the code is triggered the Complie Error messages appears stating, Argument Not Optional.
I see that there is an argument sSearchFolderName, but I am not sure what I should be providing to this argument, can you please advise?
Sincerely
Dale.
Thank you very much for providing the above code.
I placed the code in an Access module with the code to be triggered by a Command Click. When the code is triggered the Complie Error messages appears stating, Argument Not Optional.
I see that there is an argument sSearchFolderName, but I am not sure what I should be providing to this argument, can you please advise?
Sincerely
Dale.
EnumerateSearchFolderItems "Emails Per Day"
assuming "Emails Per Day" is the name of your Search Folder.
Don't forget, my sub just prints a few properties to the VBE immediate window. You'll need to customize it to do what you want. If all you want is the count of items within the folder then you only need to extract the .Count value.
assuming "Emails Per Day" is the name of your Search Folder.
Don't forget, my sub just prints a few properties to the VBE immediate window. You'll need to customize it to do what you want. If all you want is the count of items within the folder then you only need to extract the .Count value.
ASKER
Thanks again Daniel..
Still getting the compile error so am obviously not applying the code correctly.
So just to recap to see where I am going wrong here.
I have created a custom search folder called "Emails Per Day". Placed the provided code in an Access module and linked it to be triggered by a command button with a click event.
Still not sure how I am to pass the required argument.
My apologies for requesting further assistance.
Dale
Still getting the compile error so am obviously not applying the code correctly.
So just to recap to see where I am going wrong here.
I have created a custom search folder called "Emails Per Day". Placed the provided code in an Access module and linked it to be triggered by a command button with a click event.
Still not sure how I am to pass the required argument.
My apologies for requesting further assistance.
Dale
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello Daniel
All is working perfect now.
Thank you so much for all your assistance and patience with this initial request.
Sincerely
Dale
All is working perfect now.
Thank you so much for all your assistance and patience with this initial request.
Sincerely
Dale
Glad to hear and my pleasure.
ASKER
Thank you once again.
Open in new window
or even betterOpen in new window