Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-11-09
5
Medium Priority
?
2,210 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 1000 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

971 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