Results 1 to 3 of 3
  1. #1
    starson79 is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jan 2011
    Posts
    9

    Question Move to specified Outlook folder

    olNs.GetDefaultFolder(olPublicFoldersAllPublicFold ers) & <add on rest of filepath here> - to view folder in Outlook.
    Trying to make the database work with any version of Office. Need to bypass first portion of Public Folders filepath - and move from All Public Folders onwards. How do I add on the extra filepath after using GetDefaultFolder?



    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Use a variable?

    strPath = olNs.GetDefaultFolder(olPublicFoldersAllPublicFold ers)
    strPath = strPath & <add on rest of filepath here>
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    starson79 is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jan 2011
    Posts
    9

    I think I found the solution!

    I was looking for this:
    http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

    I'm modifying an existing database which was created to be compatible with Office 2003 only. WE have just upgraded to Office 2010 and the database is displaying all sorts of problems - in any case - one of which is the folderpaths. I needed to get to a folder within the All Public Folders folder. Of course, in Access 2010 - the path is something like Public Folders - <emailUserAccountName>\All Public Folders\ etc etc

    The existing code uses GetFolder(literal folderpath) - so I wanted to add some code that skips to the AllPublicFolders folder - and then navigate from that folder onwards - whatever the name of the Public Folder.

    What I now realise will work is MAPIFolder.FolderPath

    So I'm going to do this:


    Set objFolder = olNs.GetDefaultFolder(olPublicFoldersAllPublicFold ers)
    strFolderPath = objFolder.FolderPath & DLookup("[Public Folder Path]", "tbl_LT_FolderPaths", "[DepartmentID] = lookupDepartmentID()")

    (The existing database stores folderpaths in a table - which are referenced throughout the database VBA code)

    GetFolder(strFolderPath)
    (That's basically it)

    Thanks




    http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

Please reply to this thread with any new information or opinions.

Similar Threads

  1. move value in column to row
    By Avi in forum Access
    Replies: 5
    Last Post: 05-04-2011, 12:41 PM
  2. Linking accdb to Outlook Contacts folder
    By Craig in forum Import/Export Data
    Replies: 1
    Last Post: 02-14-2011, 05:51 PM
  3. Replies: 3
    Last Post: 11-10-2010, 09:52 AM
  4. Replies: 2
    Last Post: 09-23-2010, 02:50 PM
  5. Enter a folder name and open that folder
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 09-05-2010, 04:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums