Log in

View Full Version : [SLEEPER:] Inserting an object in Access



kbsudhir
01-03-2008, 04:41 PM
Hi All,

I want to save all .msg(outlook mail)saved in a folder to save in a access table.

I have created a table with a field of data type (OLE Object). But the problem is so save each and every file I have click in the cell of the field then

1. Click Insert
2. Click Object
3. Select "Create from File"
4. Browse to its location and select the necessay file to be inserted.

Can we automate the whole process by creating a macro for the same. Then I don't have to maintain the data in the folder.

IF yes, then how........????????????????


Any help regarding the same is appreciated.

:dunno

Thanks
Sudhir

Oorang
01-04-2008, 07:59 AM
You will want to do this from outlook. Loop through the mail items, then write the data to an access table using the ADODB library (Microsoft Active Data Objects) using the mailitem's body, subject, sender properties.

kbsudhir
01-04-2008, 09:51 AM
Thanks Aaron,

I am able to capture all the attributes of a mail in outlook to access but the problem is I need to capture the whole mail as an object in Access,
Which I am not able to do.

Is there any way to do the same....?????

Thanks for your time Aaron.

Sudhir

mattj
01-04-2008, 09:58 AM
You don't need to store the actual message as OLE object anyway - it will lead to database bloat. Rather, store the messages as .msg files ina folder and store the file path inthe database.

kbsudhir
01-04-2008, 04:31 PM
Thanks Matt,

But due have a code snippet to guide me. Basically as soon as click on the fileld where I am saving the path the mail should be opened.

Thanks
Sudhir

rconverse
01-13-2008, 12:47 PM
Why not just link to the folder in Outlook from your DB?

kbsudhir
01-15-2008, 12:04 PM
The reason of not linking the DB with the outlook folder is that there is a possibility that the mail has been deleted