473,378 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Re: Getting attributes from Outlook messages

Here is the code I've used in Outlook

Its the myOLApp.ActiveInspector.CurrentItem that I'm assuming wont
work with a msg file thats in a folder rather than in the Outlook pst
file.

How do I set the myItem to a msg file in a folder?

----------------------------------------------------------------------------------------------------------------------------------------------------
'S:\TechWorks\Projects\2800\2807\2807-080505-01-OUT-OtherParty-Re
Spike on the beach front.msg
'|--------ProjectPath-----------|-No-|-Date-|Pt|inout|other
party|--------Subject---------|.ext

Set myOLApp = CreateObject("Outlook.Application")
Set myItem = myOLApp.ActiveInspector.CurrentItem
'get Project Path
vProjectPath = fncProjFolderIncrement(vProjectNo) & vProjectNo &
"\"
'get date
vDate = Format(myItem.CreationTime, "yymmdd")
'get date part
sProjectNamePart = vProjectPath & vProjectNo & "-" & vDate & "*.*"
vDatePart = fncDatePart(sProjectNamePart)
vInOut = fncInOut

vAttCount = myItem.Attachments.Count
If vAttCount = 0 Then
vAttCount = Null
Else
vAttCount = " (" & vAttCount & " Att)"
End If
-----------------------------------------------------------------
Jul 22 '08 #1
1 1601
ok I've now tried using the Redemption methods, but am still having
problems as its not recognizing the method 'Session"

e.g.

Function fncOutlookMsgDate(sMsgFile As String)
Dim mySession As Redemption.RDOSession
Dim vDate As Variant
Dim Msg As MessageItem
Set mySession = CreateObject("Redemption.RDOSession")
mySession.MAPIOBJECT = Application.Session.MAPIOBJECT
<--------- error is "method or data member not found"
Set Msg = mySession.GetMessageFromMsgFile(sMsgFile)
vDate = Msg.ReceivedTime
fncOutlookMsgDate = Format(vDate, "yymmdd")
End Function

I think the Session method is in the CDO.dll, but I have got this
library ticked. so what else could it be.
Jul 24 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Joseph Kormann | last post by:
I'm building an application to retrieve emails. Which is better to use: CDO or the Outlook library? Thanks.
1
by: Peter Krikelis | last post by:
Hi, I am trying to automate the Outlook so that I can get all new messages received and look at them. I have added refference "Microsoft Outlook 10.0 Object Library" and written code: ...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
3
by: | last post by:
For a given web form, I want to know what the +simplest+ way to add an attribute to all of a particular control type on that page. For example, I might want to add an onClick attribute to all...
1
by: Roger | last post by:
All, I have some code that is executed when a "New E-mail" arrives. When executing this code on several different machines I get either the New Message or the Last Message. All machines are...
0
by: ptraj | last post by:
Dear ppls, I'm doing a small project to extract all messages from outlook by Visual Basic 6.0 and write them into a file(in MBOX format). While accessing messages i able to get headers, body,...
5
by: Mike P | last post by:
I am trying to get at different users inboxes programmatically (see code below). It works fine, except for the fact that the logon line seems to always logon to my local account rather than...
13
by: Mike P | last post by:
I am trying to get at different users inboxes programmatically (see code below). It works fine, except for the fact that the logon line seems to always logon to my local account rather than...
5
by: =?Utf-8?B?TWFya1NraQ==?= | last post by:
For about a month now, I have had trouble with Outlook Express. When logging in to Outlook Express, I get an error message stating that the connection to server has failed. My internet connection...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.