Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-19-2014, 01:42 AM
gmayor's Avatar
gmayor gmayor is offline take emails from outlook mailbox and folders to Access Windows 7 64bit take emails from outlook mailbox and folders to Access Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The line that determines the folder to process is

Code:
Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(6) 'Inbox
If 'Backup' is a sub folder of Inbox then you need

Code:
Set Inbox = OlApp.GetNamespace("Mapi").GetDefaultFolder(6).Folders("Backup")
The Attachments issue is less clear cut. It will depend on whether the message is plain text or html and if the latter whether there are any graphics in the message. Plain text messages should only produce an attachments count when there are actually attachments. HTML will have additional 'attachments' in the count to reflect graphics in the message.

You could count the attachments and then based on the count (less any graphics) determine what you add to your data table.
e.g.
Code:
Dim bAttach as Boolean
'................
If Mailobject.Attachments.Count > 0 then 
 bAttach = True
Else
bAttach = False
End If

'..................

!Attachments = bAttach
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to synchronize emails in certain folders when upgrade Outlook 2010 to Outlook 201 davip Outlook 0 07-30-2013 09:07 PM
Moving emails in shared mailbox to personal mailbox hlock Outlook 0 12-12-2012 02:32 PM
Outlook 2010 & Mailbox Access Stkitts11 Outlook 0 04-10-2012 06:48 AM
take emails from outlook mailbox and folders to Access Merging outlook folders and emails rudihorvath Outlook 1 03-16-2012 07:03 AM
take emails from outlook mailbox and folders to Access Outlook 07 Not Fetching Emails in Random folders miccguido Outlook 1 02-14-2012 01:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft