Results 1 to 6 of 6
  1. #1
    capitala is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    11

    creating folder from Ms access in outlook

    Good day,
    I have a from on which I have an (ID) field.
    is it possible to have a button on my form by which I can create a folder in Ms outlook with the same (ID) on my form




    Best Regards

  2. #2
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    Yes.

    Are you referring to a mail item folder?

  3. #3
    capitala is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    11
    yes.
    Regards

  4. #4
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    You need to code some VBA behind the buttons 'Click' event. Such code is called an event handler. Before I help you with this could you tell me how experienced you are with VBA and event handlers. Meanwhile here is some rough pseudo code of what needs to be done.

    1. Examine ID value on form. If null or blank then do nothing/exit. Otherwise trim value, etc.
    2. Create an object variable reference to the Outlook application. If Outlook is already loaded/open then set the reference to this occurrence. Otherwise create a new Outlook application occurrence. (Outlook application created from Access will be hidden.)
    3. Examine Outlook mail item folders to see if ID already exists. If it does show message and jump to step 5
    4. If no existing folder then create a new one. Confirm creation to user.
    5. If Outlook application was created by this event handler then close application. Otherwise leave Outlook application loaded and open as found.


    It is also essential that you include an error handler that makes Outlook visible if any error occurs. It is not good if somehow you end up with more than one Outlook application occurrence and even worse if one or more of these occurrences is hidden.

  5. #5
    capitala is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    11
    thanks Rod

  6. #6
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    Not exactly the answer I was expecting.

    Before I help you with this could you tell me how experienced you are with VBA and event handlers.

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

Similar Threads

  1. issue with linking outlook folder to access
    By live2ride in forum Import/Export Data
    Replies: 7
    Last Post: 12-20-2012, 12:24 PM
  2. Move to specified Outlook folder
    By starson79 in forum Programming
    Replies: 2
    Last Post: 08-15-2011, 03:29 AM
  3. Linking accdb to Outlook Contacts folder
    By Craig in forum Import/Export Data
    Replies: 1
    Last Post: 02-14-2011, 05:51 PM
  4. Replies: 3
    Last Post: 11-10-2010, 09:52 AM
  5. Replies: 2
    Last Post: 09-23-2010, 02:50 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