Solved

Having two exchange mailboxes open in outlook and sending from each one

Posted on 2006-11-09
5
2,200 Views
Last Modified: 2008-01-09
We have put in a new "networked" fax machine and it sends all incoming Faxes to an exchange (5.5) mailbox.  Our receptionist has this mailbox along with her personal mailbox (also and exchange mailbox) open in outlook.  She then will forward the "Fax" emails to the appropriate recipient selecting the Fax mailbox as the sender.  The problem we are having is that when she forwards the email that is in the "Fax" mailbox, it goes into the sent folder for her mailbox.  Right now I have a rule set up to copy the sent email to the "Fax's" sent folder, but have not figured out a way to automatically delete it from her sent folder after it copies it to "Fax's" sent folder.  She is using Outlook 2000 sp3 on a Windows 2000 professional sp4 machine.  Again, our version of Exchange is 5.5 sp4

thanks
0
Comment
Question by:mayfran-it
  • 2
5 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 17937359
I believe I can solve this with a macro.  Is that an option?
0
 

Author Comment

by:mayfran-it
ID: 17937658
sure.  i would be willing to try that.

thanks

Kevin
0
 
LVL 76

Accepted Solution

by:
David Lee earned 250 total points
ID: 18009477
Sorry to be so slow getting back to you on this.  The code below will do what you described.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code and paste it into the right-hand pane of the VB Editor window
5.  Click the diskette icon on the toolbar to save the changes
6.  Close the VB Editor
7.  Click Tools->Macro->Security
8.  Set the Security Level to Medium
9.  Close Outlook
10.  Start Outlook
11.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.
12.  Disable the rule you're using now.  The script performs handles the whole action.

Dim WithEvents olkSentItems As Outlook.Items

Private Sub Application_Quit()
    Set olkSentItems = Nothing
End Sub

Private Sub Application_Startup()
    Set olkSentItems = Session.GetDefaultFolder(olFolderSentMail).Items
End Sub

Private Sub olkSentItems_ItemAdd(ByVal Item As Object)
    If Item.Class = olMail Then
        'Change the next line as needed so the code to move the messages only fires for the forwarded faxes.  You should be able to use whatever you used for
        'the rule.
        If Item.Subject = "Fax" Then
            'Change the mailbox path on the next line to that of the fax mailbox.
            Item.Move OpenMAPIFolder("\Fax Mailbox\Sent Items")
        End If
    End If
End Sub

'Credit where credit is due.
'The code below is not mine.  I found it somewhere on the internet but do
'not remember where or who the author is.  The original author(s) deserves all
'the credit for these functions.
Function OpenMAPIFolder(szPath)
    Dim app, ns, flr, szDir, i
    Set flr = Nothing
    Set app = CreateObject("Outlook.Application")
    If Left(szPath, Len("\")) = "\" Then
        szPath = Mid(szPath, Len("\") + 1)
    Else
        Set flr = app.ActiveExplorer.CurrentFolder
    End If
    While szPath <> ""
        i = InStr(szPath, "\")
        If i Then
            szDir = Left(szPath, i - 1)
            szPath = Mid(szPath, i + Len("\"))
        Else
            szDir = szPath
            szPath = ""
        End If
        If IsNothing(flr) Then
            Set ns = app.GetNamespace("MAPI")
            Set flr = ns.Folders(szDir)
        Else
            Set flr = flr.Folders(szDir)
        End If
    Wend
    Set OpenMAPIFolder = flr
End Function

Function IsNothing(obj)
  If TypeName(obj) = "Nothing" Then
    IsNothing = True
  Else
    IsNothing = False
  End If
End Function
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question