![]() |
how to get mail's receivedTime?
_ApplicationPtr pApp("Outlook.Application");
_NameSpacePtr pNameSpace = pApp-GetNamespace(L"MAPI"); MAPIFolderPtr pOutbox = pNameSpace-GetDefaultFolder(olFolderInbox); _ItemsPtr pOutboxItems = pOutbox-Items; _MailItemPtr pNewMail=pItems-GetFirst(); DATE date = pNewMail-GetReceivedTime(); i want read the receivedTime, i get the val is DATE type. but i don't know how to change the val to time. like 2006-04-11 22:26 DATE type is double type, please help me! -- 只要决心成功,失败永远不会把我击垮! |
how to get mail's receivedTime?
You can use the VBA Format function with some named formatting arguments:
Debug.Print Format(Date & " " & Time, "HH:MM") -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "StupidDog" wrote: _ApplicationPtr pApp("Outlook.Application"); _NameSpacePtr pNameSpace = pApp-GetNamespace(L"MAPI"); MAPIFolderPtr pOutbox = pNameSpace-GetDefaultFolder(olFolderInbox); _ItemsPtr pOutboxItems = pOutbox-Items; _MailItemPtr pNewMail=pItems-GetFirst(); DATE date = pNewMail-GetReceivedTime(); i want read the receivedTime, i get the val is DATE type. but i don't know how to change the val to time. like 2006-04-11 22:26 DATE type is double type, please help me! -- 只要决心成功,失败永远不会把我击垮! |
All times are GMT +1. The time now is 09:22 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright 2004-2006 OutlookBanter.com