Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-09
5
Medium Priority
?
2,208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Changing a few Outlook Options can help keep you organized!
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

704 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