PDA

View Full Version : VBA Help for Oulook thru Exchange Server



Danimarie
10-26-2011, 09:36 PM
I am using the below information found on another forum to auto-forward my work emails to my BB via a gmail account. The script works fine.
BUT my work email ask's for every email to send either classifield or unclassified.
What and where would I add into the below script to autoforward UNCLASSIFIED???



*I have written some VBA script to do this *bypass the server's disabling of auto-forward". Basically it mimics the user forwarding the email rather than the server doing an auto-forward. It's pretty simple:
Sub AutoForwardAllSentItems(Item As Outlook.MailItem)
Dim strMsg As String
Dim myFwd As Outlook.MailItem
Set myFwd = Item.Forward
myFwd.Recipients.Add "email@email.com"
myFwd.Send
Set myFwd = Nothing
End Sub
It's beyond the scope of this post to give detailed instructions, but here's a summary: 1.Add the above code in the Visual Basic editor of Outlook (Alt-F11 should get your started). Be sure to change email@email.com to the address where you want the mail to go 2.Tell Outlook to run this code for each inbound message (Tools -> Rules and Alerts -> New Rule -> Check Messages when they arrive -> Next -> YES -> Checkbox "Run a Script" -> Then select the script you just created. Now Outlook should automatically forward each email you receive, but it won't be blocked by the Admin as an "Auto-forward".*

Any suggestion's greatly appreciated :)

JP2112
10-27-2011, 10:01 AM
I don't understand what that means. Sounds like something specific to your corporate environment. Where are you seeing this message?

Danimarie
10-27-2011, 01:25 PM
Hi,

Ok so Ive put the script above in and it works fine, however everytime I receive an email in my outlook inbox a pop up which is JANUS SEAL comes asking me to choose whether the AUTOFORWARDED (which I assume is running in background) email is to be sent classified or unclassified....

When I send an email from outlook this is meant to happen for work purposes,In the Subjuect line it will show [SEC=UNCLASSIFIED] if that helps... however I'm hoping to autoforward all messages through the script UNCLASSIFIED.

Charlize
11-08-2011, 04:36 AM
1. You have a work account in an exchange server ?
2. You have a BB, so I guess you have a personal BB account (Made by using the unique code of your phone - imei code is the name I believe - and access to a webservice for your BB.) ?
3. You can use this acccount to setup the receiving of your work email account onto your BB (I believe you are allowed one exchange account to have this functionality.).
4. On your BB you will get a notification that you have to approve something to receive workaccount - emails onto your BB. You need to login into the webservice to allow this receiving (from step 3).

Once a month, I believe, you have to reapply passwords to allow the receiving.

Why the forwarding when you can add email accounts to the BB webservice ?

Charlize