473,395 Members | 1,521 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,395 software developers and data experts.

File/GetExternalData/Link/Exchange()

In A2003 one can create a linked table using
File/GetExternalData/Link/Exchange(). It's a nice feature but by and
large fairly useless if I am reading the table structure correctly.

The From & SenderName columns may contain data like jo*****@test.com or
it may simply be Joe Blow. The HasAttachments column may be true or
false but accessing the attachments isn't available if the value is true.

Is there any way this linked table could be of use in getting the email
addresses as well as the name of the sender as well as associating or
getting the attachments? Or can one access the email via automation
with the data contained in the linked table?

Jun 27 '08 #1
2 1985
On May 19, 12:01*am, Salad <o...@vinegar.comwrote:
In A2003 one can create a linked table using
File/GetExternalData/Link/Exchange(). *It's a nice feature but by and
large fairly useless if I am reading the table structure correctly.

The From & SenderName columns may contain data like joeb...@test.com or
it may simply be Joe Blow. *The HasAttachments column may be true or
false but accessing the attachments isn't available if the value is true.

Is there any way this linked table could be of use in getting the email
addresses as well as the name of the sender as well as associating or
getting the attachments? *Or can one access the email via automation
with the data contained in the linked table?
I've been working on a similar problem - I have a bunch of attachments
stored in messages in a public folder that needed to be associated
with an Access database.

The quickest way I found was to attach code to Outlook to interogate
the selected folder, then walk through the messages looking for
attachments and, if found, copy them to a directory whilst copying
info about the message and file name (I had to rename a number of
attachments because their original name was form.pdf) to a text file.
Based on the time contraints and what I didn't originally understand
about the project I ended up with quite a kludge. Here's the first
part (just before it gets reall ugly)"

Public Sub SaveAllAttachments()

'Note, this assumes you are in the a folder with e-mail messages
when you run it.
'It does not have to be the inbox, simply any folder with e-mail
messages
'On Error GoTo ErrorHandler

Dim App As New Outlook.Application
Dim Exp As Outlook.Explorer
Dim Sel As Outlook.Items
Dim sSub As String
Dim sFile As String
Dim att As Attachment
Dim attName As String

Dim AttachmentCnt As Integer
Dim AttTotal As Integer
Dim MsgTotal As Integer

Dim outputDir As String
Dim outputFile As String
Dim fileExists As Boolean
Dim cnt As Integer
Dim lf As Integer
Dim iNS As Integer

'Requires reference to Microsoft Scripting Runtime (SCRRUN.DLL)
Dim fso As FileSystemObject

Set Exp = App.ActiveExplorer
Set Sel = Exp.CurrentFolder.Items
Set fso = New FileSystemObject
lf = FreeFile()

outputDir = "S:\public\project_folder\Forms\"

'Loop thru each selected item in the inbox
Open outputDir & "file_list.txt" For Output As #lf
Write #lf, "Subject", "Attachment", "FileName", "Status"
For cnt = 1 To Sel.Count
'If the e-mail has attachments...
If Sel.Item(cnt).Attachments.Count 0 Then

### end sample ####

The original code I modified is at http://arcanecode.files.wordpress.co...tachments3.txt

If I was smarter I imagine that I could do all of this from within
Access and move the files one at a time.

I too am interested in hints and guidance on how to do that.

Tim Mills-Groninger
Jun 27 '08 #2
timmg wrote:
On May 19, 12:01 am, Salad <o...@vinegar.comwrote:
>>In A2003 one can create a linked table using
File/GetExternalData/Link/Exchange(). It's a nice feature but by and
large fairly useless if I am reading the table structure correctly.

The From & SenderName columns may contain data like joeb...@test.com or
it may simply be Joe Blow. The HasAttachments column may be true or
false but accessing the attachments isn't available if the value is true.

Is there any way this linked table could be of use in getting the email
addresses as well as the name of the sender as well as associating or
getting the attachments? Or can one access the email via automation
with the data contained in the linked table?


I've been working on a similar problem - I have a bunch of attachments
stored in messages in a public folder that needed to be associated
with an Access database.

The quickest way I found was to attach code to Outlook to interogate
the selected folder, then walk through the messages looking for
attachments and, if found, copy them to a directory whilst copying
info about the message and file name (I had to rename a number of
attachments because their original name was form.pdf) to a text file.
Based on the time contraints and what I didn't originally understand
about the project I ended up with quite a kludge. Here's the first
part (just before it gets reall ugly)"

Public Sub SaveAllAttachments()

'Note, this assumes you are in the a folder with e-mail messages
when you run it.
'It does not have to be the inbox, simply any folder with e-mail
messages
'On Error GoTo ErrorHandler

Dim App As New Outlook.Application
Dim Exp As Outlook.Explorer
Dim Sel As Outlook.Items
Dim sSub As String
Dim sFile As String
Dim att As Attachment
Dim attName As String

Dim AttachmentCnt As Integer
Dim AttTotal As Integer
Dim MsgTotal As Integer

Dim outputDir As String
Dim outputFile As String
Dim fileExists As Boolean
Dim cnt As Integer
Dim lf As Integer
Dim iNS As Integer

'Requires reference to Microsoft Scripting Runtime (SCRRUN.DLL)
Dim fso As FileSystemObject

Set Exp = App.ActiveExplorer
Set Sel = Exp.CurrentFolder.Items
Set fso = New FileSystemObject
lf = FreeFile()

outputDir = "S:\public\project_folder\Forms\"

'Loop thru each selected item in the inbox
Open outputDir & "file_list.txt" For Output As #lf
Write #lf, "Subject", "Attachment", "FileName", "Status"
For cnt = 1 To Sel.Count
'If the e-mail has attachments...
If Sel.Item(cnt).Attachments.Count 0 Then

### end sample ####

The original code I modified is at http://arcanecode.files.wordpress.co...tachments3.txt

If I was smarter I imagine that I could do all of this from within
Access and move the files one at a time.

I too am interested in hints and guidance on how to do that.
The File/GetExternalData/Link/Exchange() seems like someone created a
demo of what a person could do between Access and Outlook. It's like a
teaser, somebody did it at MS to show some capabilities and then either
dropped it or else decided it was a bit too complicated to follow thru
to make it a full fledged process. Why it was even included in Access
is beyond me.

There's code in Google for using automation but using built in features
to use queries and recordsets would have been nice.

Good luck in your design.
>
Tim Mills-Groninger
Jun 27 '08 #3

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

Similar topics

14
by: Aaron | last post by:
On my website I have a dynamic link(aspx) to this file 0AX120S.jpg(privacy protection). When a visitor clicks on the link I want them to see my_vacation_pic.jpg (fetch realname from database) is...
1
by: Patrick | last post by:
I'm trying to create a link from Access 2003 to an Exchange 2000 Public Folder called "WMContacts" I choose File => Get External Data=> Link Tables. I choose Exchange() and the wizard give me the...
4
by: HEATHER CARTER-YOUNG | last post by:
Please help. I have two databases - one I'm designing that will be our in-house data mgmt system (db1) and another that is a federally-mandated system (db2). We must submit data from db2 but don't...
1
by: ED | last post by:
Can anyone give me a solution to loading a flat file with an extension of .txt into an access table automatically, aka user clicks a command button. Thanks
19
by: jameso321 | last post by:
Hi, We run an MS Access 2000 DB with about 15 users. It is on a Win 2000 Server (SP4) machine and runs through Citrix Metaframe Presentation Server 3.0. --------------------------
8
by: sudhirlko2001 | last post by:
How to swap two nodes of doubly Linklist
10
by: Mariame | last post by:
Hi Everyone How can i make a link in my aspx file open a PDF Files??? Thx in Advance
1
by: kalpanaali | last post by:
Link and Banner Exchange ..pls help I am building a site....very very little traffic I am totally ingnorant of Internet marketing... I have heard of different types of link/...
0
by: mobilust.net | last post by:
hi everyone, i am trying to write my own link/bannner exchange script using ms access database but i've got stuck on main part. selecting the banner/link to show on the page, i have done a rondom...
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.