Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185

    Adding outlook folder items to listbox

    Hi Guy's is there a method of adding inbox items to a list box ?

    If i can have a list box ie: lstInbox then populate it with a specific mail inbox would be great ?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Can set a link to Outlook inbox and use that link table as source for a combobox or listbox. What purpose would this serve? What are you really trying to accomplish?
    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
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Dave,

    Have a look at my sample: http://forestbyte.com/ms-access-util...ook-companion/
    I use Outlook automation to interact with Outlook (I have a local table to specify the mailbox and other variables that can be changed by the user).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi, thank you Jun7 and Gicu, i will try your link thank you

    To answer June7, we have web enquiries where in my inbox and when new enquiries come through, these are always called from processor, what i am trying to achieve initially is have a list box with all of the emails within the subject of Form Processor so that you can see new emails from a list box, eventually, this will allow more users to respond as we are all working with Access anyway rather that us maybe not checking mails for a while and there maybe more enquiries to follow up.

    So if we have them in a list box, i can then maybe add timer refresh and pop up Msgbox when new mails have arrived in the Form Processor subject of that email inbox

    Hope this all makes sense

    Kindest

  5. #5
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi Guy's so if i can have the this picture in a list box then i can refresh on timer and see new emails then pop up a msgbox "there a new emails to follow up" then from thereon i am able to develop some code to add some of the mail contents maybe to a new table called tblInbox then can distribute data and generate reply mails, the better part of doing this for me is i can add modules with some responses to the emails, generally there are only 2 of us that can value the email query whereas i can add the modules to put in my knowledge of values and responses so that more users can respond

    Click image for larger version. 

Name:	Capture.JPG 
Views:	20 
Size:	22.7 KB 
ID:	42605

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Dave,

    This is all easily achieved by automating Outlook. You could create an Outlook rule based on the sender ("form-processor") to move all these emails in a specific Outlook folder ("ToBeProcessed"). Then you setup the VBA code in Access to loop through that folder, bring them into your Access table then move the email into another (sub) folder ("Processed"). At this time you could also send the reply acknowledgements.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  7. #7
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi Vlad, thank you so much for your reply, would you have a starting point for me step by step

    Ie, what Dim's I would need then then what i need each one to do

    So something like:

    Loop through a specific inbox then add to me.lstInbox ?

    Kindest

  8. #8
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Dave, download my sample file and have a look at the objects/ VBA , it should get you going. I am going camping for a few days and I'll probably be out of cell range I'll check back on my return.
    Cheers

  9. #9
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Dave,

    Just curious if you got this working or if you still need help with it.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  10. #10
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi Vlad, thank you for your reply, no i didn't get it to work, although i haven't had much time to attempt, i did download your sample db, i am not sure which part of the sample db to take the idea from although yo did mention it.

    Are you able to copy and paste the vb that would help ?

    I have tried a couple of things but like mentioned not had much time at it

    If i can have a button and a list box, the list box displays a specific inbox then fantastic then i may change the button to an on form timer or a different event where it is updated

    Thanks Vlad

  11. #11
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Dave,
    Open the tblEmailSettings and enter the mailbox folder you want to check (right now it is set to Personal Folders/Inbox). Also update the two date fields to include an interval where you have emails in that folder. Then open the frmReadMail and it should populate the list box with the emails you want.
    Click image for larger version. 

Name:	Capture.PNG 
Views:	12 
Size:	86.7 KB 
ID:	42685
    The code you want is the frmReadEmail form.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  12. #12
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi Vlad, thank you, yes it works a treat does that, It is checking mails 08/08/20 to 09/08/20, is it just a case of entering todays date for latest check ? or can the form open event auto add todays date ?

    This is look great though

  13. #13
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi Vlad, this works great, the only question is, i can't expand to see queries / tables etc ?

    I am going to work out how i can integrate it to my current db

  14. #14
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi Dave,
    Glad to hear, all objects (queries, tables) should be visible, if not just go to Options/Current Database/Navigation and click the view hidden (and system) objects. It's been a long time but I think if you click the Check for Today's on startup box it should limit to today's messages. Also the Outlook entry id could be useful to you as it is (in most cases) unique and can be used to avoid processing duplicates.
    Let me know how you make out, I also have code to move messages from the "inbox" or "to be processed" to a ""processed" folder to avoid duplication.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  15. #15
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,185
    Hi Vlad, it's all looking good on some inboxes, because i am trying to see emails sent from our website, am i correct in thinking the server information is added to the list rather than the actual sender ?

    Can the listing be adjusted to accommodate that ?

    Thanks again for your input

    Click image for larger version. 

Name:	Capture.JPG 
Views:	9 
Size:	162.0 KB 
ID:	42716

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Outlook.MAPI Folder
    By DMT Dave in forum Access
    Replies: 1
    Last Post: 03-28-2019, 10:55 AM
  2. Adding all items in ListBox
    By Voodeux2014 in forum Programming
    Replies: 12
    Last Post: 11-10-2015, 01:31 PM
  3. Replies: 2
    Last Post: 03-27-2015, 08:48 AM
  4. Replies: 7
    Last Post: 02-01-2013, 02:58 PM
  5. Move to specified Outlook folder
    By starson79 in forum Programming
    Replies: 2
    Last Post: 08-15-2011, 03:29 AM

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