Link to home
Start Free TrialLog in
Avatar of Fritters
Fritters

asked on

Count emails in an open folder

I need VBA code to put into Outlook that will be called and will count the number of emails in the particular Exchange folder that is open and put the count in string format onto the windows clipboard.  The calling program (which has no VBA access) will read the text string from the clipboard and continue in a loop.  
The VBA function or sub routine is run by my program by simulating Alt-F8 in Outlook and "typing in" the name of the function or subroutine.  
I grabbed and tweaked code but it doesn't work.  I have very little knowledge of VBA or VB.
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fritters
Fritters

ASKER

If my module already has Declare statements at the top, am I correct that I have to add everything above the "Function ClipBoard_SetData(MyString As String)" line to the previous Declare Statements?

I suppose it would easier and clearer to just create a new module?

Yes, easier to create a new module.