Solved

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

Posted on 2006-11-09
5
2,198 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
Comment Utility
I believe I can solve this with a macro.  Is that an option?
0
 

Author Comment

by:mayfran-it
Comment Utility
sure.  i would be willing to try that.

thanks

Kevin
0
 
LVL 76

Accepted Solution

by:
David Lee earned 250 total points
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

If you don't know how to downgrade, my instructions below should be helpful.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
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 …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now