473,396 Members | 1,992 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Outlook Exchange Visual Basic Help

I am using the below information 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 :)
Oct 27 '11 #1
0 1338

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: jasper | last post by:
hi, i am trying to make a very simple program that will just detect and output your currently connected IDE devices. It will look something like this: IDE PRIMARY MASTER: IDE PRIMARY SLAVE:...
4
by: Corepaul | last post by:
I am a beginner, using Access 2000. I am having difficulty with the Visual Basic Help. Specifically, using the Index tab, when I enter "OpenRecordset" in the keyword field and click the Search...
0
by: planetthoughtful | last post by:
Hi All, It seems my installation of Visual Basic Help for Access 2003 is missing pages / entries. eg, when I do a search on 'subform' and then click on 'Me Property' in the search results, I...
2
by: icbanana22 | last post by:
Hi there- I am trying to create a vb program and I am very new at this! Please help. Using the mouse up and mouse down event I need to draw lines. The lines will begin where the mouse is pressed...
6
by: mrtopher | last post by:
I'm in a visual basic programming class at my community college and I'm having one hell of a time trying to figure this out. I'm supposed to create a weekly pay calculator as a project for class, so...
2
by: helraizer1 | last post by:
In Excel I have a "Home" page with cells in which you insert: Customer Name Customer Type (drop down type for 'Standard', 'Business man' and 'Tour Group'.) Nights Staying Room Number (Drop Down...
0
by: giladbarner | last post by:
Hello everyone, I have office 2003 Professional, and I work in Access's Visual Basic Editor. Sometimes after opening the "Microsoft Visual Basic Help" window by standing on a function in the...
0
by: bamboo21 | last post by:
How can i change account in outlook using visual basic? what's the code for this?
1
by: ar123456 | last post by:
Dear Sir I want to know where can I find and download Visual Basic 6.0 help file, does it need MSDN Library or not? and if it need, where can I download MSDN Library for Visual Studio 6.0 ? ...
3
by: Jyo72 | last post by:
Hi, I need help to solve my problem. I am a newbie in VBA -- outlook. I have to create a module to create outlook body text with data, editable text boxes and need to pass some text wiht...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.