Setting Storage folder


  1. Posts : 13
    Windows 7 64 bit
       #1

    Setting Storage folder


    Hey folks,
    So i have recently upgraded a machine to win 7/office 2010, within the old build when you would send an email in outlook it would prompt you with a folder list where to save the message...

    with the windows 7/2010 build i used the outlook vba to set it up as i did in this office 03 build:

    Private Sub Application_ItemSend(ByVal Item As Object, _
    Cancel As Boolean)
    Dim objNS As NameSpace
    Dim objFolder As MAPIFolder
    Set objNS = Application.GetNamespace("MAPI")
    Set objFolder = objNS.PickFolder
    If TypeName(objFolder) <> "Nothing" And _
    IsInDefaultStore(objFolder) Then
    Set Item.SaveSentMessageFolder = objFolder
    End If
    Set objFolder = Nothing
    Set objNS = Nothing
    End Sub
    Public Function IsInDefaultStore(objOL As Object) As Boolean
    Dim objApp As Outlook.Application
    Dim objNS As Outlook.NameSpace
    Dim objInbox As Outlook.MAPIFolder
    On Error Resume Next
    Set objApp = CreateObject("Outlook.Application")
    Set objNS = objApp.GetNamespace("MAPI")
    Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
    Select Case objOL.Class
    Case olFolder
    If objOL.StoreID = objInbox.StoreID Then
    IsInDefaultStore = True
    End If
    Case olAppointment, olContact, olDistributionList, _
    olJournal, olMail, olNote, olPost, olTask
    If objOL.Parent.StoreID = objInbox.StoreID Then
    IsInDefaultStore = True
    End If
    Case Else
    MsgBox "This function isn't designed to work " & _
    "with " & TypeName(objOL) & _
    " items and will return False.", _
    , "IsInDefaultStore"
    End Select
    Set objApp = Nothing
    Set objNS = Nothing
    Set objInbox = Nothing
    End Function


    In the office 2010 build it works the first time but then does not work after that. Any idea on how to get this to prompty everytime? thanks! any/all help is greatly appreciated!
      My Computer


  2. Posts : 13
    Windows 7 64 bit
    Thread Starter
       #2

    anyone?
      My Computer


  3. Posts : 3,009
    Windows 7 Home Premium 64bit
       #3

    I would think that "Quick Steps" in Outlook 2010 would serve the purpose without vba:
    Automate common or repetitive tasks with Quick Steps - Outlook - Microsoft Office

    Hopefully I have understood what you are trying to recreate. :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:33.
Find Us