Hi,
Hope someone can help me. This challenge seems like a doozy to me, but I figure it would be very easy to someone who knew what they were doing. I have experience with SQL programming and using VB to automate Excel reports (formatting, page setups, etc.) but this is way above my head.
I work for a bank, and we have the need to check our outgoing email messages (and their attachments) for account numbers to ensure none of our employees are sending confidential information out of the company. I want to create an Outlook COM add-in. It should work kinda like spell-checker: the add-in should be invoked if the user clicks a button on a toolbar or tries to send an email. The add-in would then search through each word in the email body and all attachments; and if any potential account #s are found, the add-in should prompt the associate to replace each account number with something unrecognizable - kinda like you see for credit card numbers that show up as xxxx-xxxx-xxxx-#### on receipts.
I'm using Visual Basic version 6.3.
I have no idea how to do this! Here's a detailed list of what I think the steps should be. Any help with all/part of the process would be much appreciated!
1) Search all words in the Outlook email body (including original messages being replied to, etc.) for potential account numbers - i.e. any word containing 2+ numbers in the string. I was thinking about using VAL()>0 to find them. Not sure how to script that each word needs to be checked. I would imagine that a "word" is not simply character/number strings bounded by spaces, as they could also be separated by hard returns, commas, double quotes, etc. or any combination thereof.
2) For each potential account number found, highlight the original number, and prompt to replace with something unrecognizable, or "skip" if the word with numbers isn't an account number (such as an address).
3) As a default replacement, I'd like the add-in to suggest the original number (retaining all dashes, underscores, dots, etc.) substituting X's for all but the last 4 numbers. String lengths can vary. So for example, account AFB-4488 would be suggested as XXX-4488; account ABCDEFG.123456 would be suggested as XXXXXX.XX3456. The user could replace with the suggested text, "skip" the word, or replace the word with any other string of their choice.
4) Continue until all words have been checked.
5) Repeat the same process for any and all attachments.
6) Then either go back to the email or send the email, depending on whether the user clicked a toolbar button or tried to send the email to invoke the add-in.
7) After creating all the functionality above, I need to make it into a COM add-in that can work across multiple versions of Outlook (97, 2000, 2003, etc.).
Please help, if you can!
-Jessica
Hope someone can help me. This challenge seems like a doozy to me, but I figure it would be very easy to someone who knew what they were doing. I have experience with SQL programming and using VB to automate Excel reports (formatting, page setups, etc.) but this is way above my head.
I work for a bank, and we have the need to check our outgoing email messages (and their attachments) for account numbers to ensure none of our employees are sending confidential information out of the company. I want to create an Outlook COM add-in. It should work kinda like spell-checker: the add-in should be invoked if the user clicks a button on a toolbar or tries to send an email. The add-in would then search through each word in the email body and all attachments; and if any potential account #s are found, the add-in should prompt the associate to replace each account number with something unrecognizable - kinda like you see for credit card numbers that show up as xxxx-xxxx-xxxx-#### on receipts.
I'm using Visual Basic version 6.3.
I have no idea how to do this! Here's a detailed list of what I think the steps should be. Any help with all/part of the process would be much appreciated!
1) Search all words in the Outlook email body (including original messages being replied to, etc.) for potential account numbers - i.e. any word containing 2+ numbers in the string. I was thinking about using VAL()>0 to find them. Not sure how to script that each word needs to be checked. I would imagine that a "word" is not simply character/number strings bounded by spaces, as they could also be separated by hard returns, commas, double quotes, etc. or any combination thereof.
2) For each potential account number found, highlight the original number, and prompt to replace with something unrecognizable, or "skip" if the word with numbers isn't an account number (such as an address).
3) As a default replacement, I'd like the add-in to suggest the original number (retaining all dashes, underscores, dots, etc.) substituting X's for all but the last 4 numbers. String lengths can vary. So for example, account AFB-4488 would be suggested as XXX-4488; account ABCDEFG.123456 would be suggested as XXXXXX.XX3456. The user could replace with the suggested text, "skip" the word, or replace the word with any other string of their choice.
4) Continue until all words have been checked.
5) Repeat the same process for any and all attachments.
6) Then either go back to the email or send the email, depending on whether the user clicked a toolbar button or tried to send the email to invoke the add-in.
7) After creating all the functionality above, I need to make it into a COM add-in that can work across multiple versions of Outlook (97, 2000, 2003, etc.).
Please help, if you can!
-Jessica