Modules & VBA :: Storing Outlook Attachments And Patch In Table

Jun 13, 2015

Currently, I'm taking my unread emails, storing them in a table then sending any Excel files to a specified folder I've modified some code I found while surfing and it works great but I'd really like to send the attachment name and file path with the email recordset. It's been a long day so maybe it's super simple. Below is my code. Office 2010 Windows 8.1

PHP Code:

Function ReadInbox()
Dim TempRst As DAO.Recordset
Dim OlApp As Outlook.Application
Dim Inbox As Outlook.MAPIFolder
Dim Atmt As Outlook.Attachment
Dim InboxItems As Outlook.Items

[Code] ....

View Replies


ADVERTISEMENT

Modules & VBA :: Storing Attachments On A Network

Jun 12, 2013

First, I'm developing both the Front End and Back End in Access 2007, and I intend to distribute the application using the Access Run Time. The powers that be will not let me use SQL Server.

The database is required to house attachments. Initially, I had created a separate back end database to store the attachments, but the file would quickly grow beyond the 2GB limit - roughly within 3 weeks. Instead, I decided to save the "attachments" in folders (named after the parent records PK ID) on the network. Using VBA, I would populate a list, based on the parent record, from which the user could select the file, do what needs to be done, then save it.

Unforunately, we're running into data security issues - all of the attachments will have private personal information - SSNs, Loan Numbers, Account Numbers etc., so they need to be stored in a location that's not universally accessible. All of the users have different permissions based on their department, acting as a very basic security level (i.e., Department 1 users will not be able to view any parent records associted with departments 2 or 3).

So I need a way for my back end to take a file located in a separate directory not normally available to the Front End User, then move that file (or save a copy that will be overwritten when re-attached to the record) to a location that IS accessible to my Front End User.

Can I create/use modules stored on the back end?

My first thought is to let the back end store the record in a temporary attachment table that is deleted when the user is done with it, but I've noticed that Access has trouble reclaiming the space when the attachment is ultimately deleted once the user is done using it, and I'll run into my 2GB limit again.

Alternatively, I could create a new .accdb file each time the record's attachments need to be accessed, and then delete that database once it's done and the attachments are returned to the secure location, solving my limit problems.

View 1 Replies View Related

Modules & VBA :: Storing Attachments On Linked SQL Server

Jun 27, 2013

I'm trying to store files on a linked SQL Server table, much the way I would using the Attachment data type in Access. (I couldn't use the Attachment data type, though, due to size restrictions - we're storing about a gig a week.)

Almost everyone says to store the attachments on a file system and save the location - I can't do that because of varying permissions. The files HAVE to be stored in the SQL Server table for security reasons.

So how do I do it? I've tried converting the files to binary and updating the recordset that way, but it always comes back as null. I'm not sure what I'm doing wrong.

Code:
Public Function Test(strFile As String) As Boolean
Dim rsAtts As dao.Recordset
Dim ifilenum As Double
Dim btAR() As Byte
Set db = CurrentDb

[Code] ....

View 9 Replies View Related

Modules & VBA :: Email In Outlook With Attachments

Jun 16, 2013

I am making a new database. And I want to confirm that I can do all the following in Access 2007 and how is best to do it.

1) A form where I can define:a unique Email Number starting at 1.
a directory eg "C:UsersPaulDesktop101 - Brick House"
an email address.
a Recipient Name
a Category for the email. Choosing either "Working" or "Complete". This would be part of the email subject.

2) a button which onclick lists all the files in the defined directory to a box on the form.

3) a button which onclick exports a report containing the list of files to PDF. Then attaches a zip of these files and the PDF report to an email in Outlook for revision before sending.

4)In Outlook the subject would be:

"The Directory Name" - "The Category" - "The Email Number"
"101 - Brick House - Working - Email 1"

5)In Outlook the body would simply be the subject of the email followed by the filenames of the 2 attached files, ie the PDF report and the zip.

View 7 Replies View Related

Save Outlook Attachments In A Dir

Aug 11, 2015

I expand my code as follow (save the attached files from Outlook - after: If Not Err.Number <> 0 Then):

Code:
Option Compare
DatabaseOption Explicit

Private Sub Befehl17_Click()
' ##################### OutlookImport ##################################
Dim db As DAO.Database
Dim rs As DAO.Recordset

[Code] ...

The directory "Unterlagen" allready exist.

So, the definition of the path works (strPath)
the creation of the path wirks (MkDir)

but the SaveAs command did not work, the new directories are empty.

View 10 Replies View Related

Storing Outlook Emails In Access

Jul 30, 2014

I'm wondering if there is anyway I could drag and drop an email from outlook into a field in access? we are currently taking the email and converting it to PDF, then adding it to an attachment field with the appropriate record it corresponds to.

I'd like to be able to simply have access and outlook open, and drag the email from my inbox right into access and store it in access, is this possible?

View 2 Replies View Related

Modules & VBA :: How To Send Different Attachments To Different Recipients

Jul 22, 2015

I currently have a code set up which sends an attachment from a drive on my computer to all the email addresses in a certain query. I would like to change the code so that I can add a button that will allow me to send an email with a specific attachment depending on their individual code in a table, e.g each person will receive a specific attachment. At the moment, the attachments are saved with the same file name as the person's specific code.The code I am currently using is:

Private Sub Command9_Click()
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim qdf As DAO.QueryDef
Dim prm As DAO.Parameter
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object

[code].....

View 9 Replies View Related

Modules & VBA :: Sending Email With Or Without Attachments

Jan 12, 2015

I'm working on a database for work that email's the current record after the form is completed. I have a attachment field in the table called Photo and some record's have a photo attached and other's don't. The code below works great with records that have a photo attached, but I get a path not found if I try to email a record that does not have a photo. I know that I need to put some form of code to check the photo field for a attachment, but I'm having a brain fade as to just what the code is.

Code:
Private Sub eMail_Report_Click()
Dim oFilesys, oTxtStream As Object
Dim txtHTML As String
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem

[Code] ....

View 5 Replies View Related

Modules & VBA :: Open Multiple Attachments

Jul 15, 2013

I have a Database with a field that holds several attachments. I want to make a command button for a form that will open the attachment window that pops up when you double click on the attachment in the table. attach_fig7(1).gif.. I'd like the above window to open when I click the command button.

View 3 Replies View Related

Modules & VBA :: Save Attachments From Query?

Feb 2, 2015

The code works only for tables and not query.

Code:

Dim dbs As DAO.Database
Dim rsQuery As DAO.Recordset
Set dbs = CurrentDb
Set rsQuery = dbs.OpenRecordset("myQuery")
Set rsImage = rsQuery.Fields("Images").Value
While Not rsImage.EOF
rsImage.Fields("FileData").SaveToFile "C:UsersmyNameDesktop"
rsImage.MoveNext
Wend

View 2 Replies View Related

Modules & VBA :: Send Multiple Attachments Automatically

May 27, 2014

I am working on a database that will notify technicians if they have orders that have been placed on back order. The technician can enter two kinds of orders, one for a specific job and one to replenish the stock in his truck. My manager has asked that I create separate reports for each kind of order and e-mail them to the technician. Is there a way to program Access to send an e-mail with two separate attachments?

I would also like the e-mail to send without the user needing to click the Send button. Is that possible? The database will be sending twenty plus e-mails each time the button is pressed, and I would like to avoid needing the user to click the Send button that many times.

View 1 Replies View Related

Modules & VBA :: Export All Attachments In Current Record

Nov 5, 2013

i want to crate a continuous form where i can add a button to export all of the attachments in that current record, i can create a folder and name it same as the selected record but how I can export all of the attachments in that record

Code:
Dim strUserName As String
Dim Location As String
strUserName = Environ("UserName")
Location = "C:Documents and Settings" & strUserName & "Desktop" & Me.ID
If Dir(Location, vbDirectory) = "" Then
MkDir Location

View 2 Replies View Related

Modules & VBA :: Open Files With Hyperlinks And Send As Attachments?

May 15, 2014

I have a database which has several records with at least 5 documents needing to be attached to each record. Using attachments or OLE would cause considerable bloat, so I opted for hyperlink fields for all the document types necessary to save with each record. However, now I am faced with an issue. It is easy enough to write code to open the files by following the hyperlinks, as well as write code to send an email, but how would I go about combining the two? I need to write a code that will attach these documents to an email, as attachments and not as hyperlinks. I know with excel documents, I could follow the hyperlink and send the document by email through excel, but I also have images converted to pdf's that need to be sent as attachments.

View 4 Replies View Related

Modules & VBA :: How To Send Attachments Using Path Instead Of Attachment Field

Apr 6, 2014

I have some code that attaches any files that are in my attachment field on the current record in to a email this is great but I m starting to realise that this is take up way to much space as it hold a copy in the database and can t afford to go down the sql sever route so what I have done is added some new fields called path1, path2 ,path3 ,path4 and path5 now the user can add the files location to these text box instead of add them via the attachment field also I can now limit number attachments to each record

Code:
Private Sub cmdEmail2_Click()
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim OutlookAttach As Outlook.Attachment
Set appOutLook = CreateObject("Outlook.Application")

[Code] ....

Some how I need to change this so it checks fields path1 path2 path3 path4 path5 on the current record and see if anything is entered in these textbox's and follow the paths and attach the files to email

How to make command button . How to add a file path to a text box

1. add new field to your table e.g "path1"
2. add the new field to your form
3 create new command button call it addpath
4 add code below to click on event

Code:
Private Sub addpath_Click()
Dim fDialog As Office.FileDialog
Dim varFile As Variant
' Clear listbox contents. '
Me.Path1.Value = ""
' Set up the File Dialog. '

[Code] ....

This will now save file location path to the path1 text box. To open file path

1.add another command button call it "pathopen"
2. add code below on click event

Code:
Private Sub pathopen_Click()
Application.FollowHyperlink Me.Path1
End Sub

View 2 Replies View Related

Disabled Append Queries - Due Patch Update To Windows

Mar 28, 2008

Hi,

I'm hoping someone might be able to help point in the right direction. Our IT department applied a patch update to windows 2000 overnight, which has had an impact on the Append queries in my DB.

Basically I have a number of append queries that use lookup tables to append the appropriate data from the underlaying table to the required table. They all have a relationship of "only include rows where the join fields from both tables are equal".

These were all working fine yesterday, but this morning, even though there is data in the underlaying table that meets the criteria, not data is being identified.

Has anyone any idea, as our IT department don't know and are not prepared to undo the patch update.

Your assistance would be most appreciated.

John

View 1 Replies View Related

Possible To Send Out A Patch / Better Way Of Updating Databases For Multiple Users?

Jan 21, 2015

I maintain a simple Access database which about 30 other users have open every day and use it solely as a reference book. It is simply a large reference 'toolbox' with one form and many many sub reports in the form with links to refference guides for my users. Very often I need to add new reports and just new content overall to the database. My current process is to

1) make a copy
2) modify the copy with all my new content
3) Send and email with the file attached telling all 30 users to delete their old database and use this updated version.

Of course we have many issues including:

1) The files are very large in Lotus notes (is there a way to make these files a lot smaller)
2) Seems like a waste to delete and replace an entire database when only 1 or 2 minor links need to be changed every time. Is there a macro or some code I can create that would act as a patch where the 30 users can run the code and it will change hyperlink paths that I needed changed, report content or anything that needs changing.

gets around having all my users copy and replacing their database toolbox on their desktop. We all work out of a shared network drive so I can have them use the database together in a shared drive but its litterally impossible to have every hand out of the database all at once so I can go in and update, it just does not happen so if there is a work around for getting all users out of the DB, it could avoid having to do anything else.

View 11 Replies View Related

Button To Add Attachments To A Table

Jul 30, 2014

I am looking for a way to attach X amount of pictures to a record. I want to use a command button that opens an explorer to choose X amount of files. I don't want to just open a folder because that won't return the file location.

How to open an "attachment explorer"?

Access 2007

View 1 Replies View Related

Modules & VBA :: Add Attachments To Email Using Subform Field To For Attachment Path

Jun 15, 2015

How to add attachments to a email using a sub form were I store the attachment paths

E.g I have a main form called frmteaminfomer with various fields and continuous subform called attachmentssubform in the sub form I have a field call txtaddress . I have some code that I can pick a file then put its file path into txtaddress field and also have a check box call add to email. so what I trying to do is loop through all the records in the subform and if the check box is true add the files as attachment on the email.

View 14 Replies View Related

Queries :: Records With Attachments In Table?

Feb 6, 2015

I am working with access 2010 and I have a database that has attachments in the table. I have set up a query to in by database but every time I have a record with 2 or more attachments on it it shows that record as two different records in my query. I am wondering if there is a way I can make the query show one record and to be able to view attachments like in the original table.

View 1 Replies View Related

Tables :: Appending Attachments From One Table To A New Table

Mar 17, 2013

I currently have an unnormalized table that consists of individuals (employee profiles) which currently has a field for attachments. I am using the "attachments" for photographs of each employee however I dont want to maintain photographs for former employees, or if I do not forever. I was told to normalize the table by removing the "attachment" field and placing it in a new table with referene to the employeeID.

Since I currently have something like 200+ records where I want to relocate the employee picture, i tried to create a make table query off the origional table and only referencing the employeeid and "attachment" to the new table however I keep getting an error when running the query. The error indicates something to the affect of having multiple values.

View 4 Replies View Related

Modules & VBA :: Storing Query Results In A Variable

Jan 20, 2014

I have a query which returns a list of reports I have created this session.

I want a button that when I click it runs the query and then stores the results into a variable.

I looked online and found a pretty good connection code and loop code to get the data but I'm having a hard time getting it to store into a variable.

What I want to do next is using code print the reports that were listed in the query.

That Means I need to be able to take that variable and pop the information off it, storing it into another variable (or if i can use an array just use that) and use that to concatenate into a command to print that report.

I am having problems with the syntax of this though. I think I'm just missing some key elements.

View 3 Replies View Related

Table For Storing Updates

Nov 21, 2004

How do I create a table relationship where a secondary reltated table stores past dates, status code and customer ID. For example: I want to keep track of the past dates that an order was revised and why it was revised. So, if I have a customer who was due for installation on 10/21/04 and status is PEND for pending. THen on 10/18/94 I change the date of PEND to 10/25/04. I want to keep track of the times it changed and the reason why. HOw can I make the program automatically create a record in the revision table storing the past code, reason and date using customer ID as key and teh revision table would allow multiple records for each customer ID. DId I make sense?

View 2 Replies View Related

Storing Time In A Table

Feb 11, 2008

Hi,

Firstly this is my first post so please forgive me if i do not conform to the usual way of asking a question!

I have an access database set up and it is working well, so far!

What I wish to do is the following, I am creating this for a cycling club to store race results...

I wish to store the time that they completed the stage in, how do i do this using the date/time field option when all it wants to do is store a complete time.

for example i wish to store 1 hour 12 minutes 15 seconds in the table as 1:12:15 for stage 1.

Plus they may have received a penalty, so in another field I would like to say store a 10 second penalty...

anyway you get the idea.... please could somebody inform me on the best way to do this, it has to be stored as a time so I can add all the stages up later and create a report!

Thanks in advance...

View 3 Replies View Related

Storing A Number In Another Table

Mar 13, 2006

Hi

I have a database which picks up information from my accounts package. It has the following fields

ID,Name,Date,Ref1&Ref2

I need to extract the last ID number and store it in a table or somewhere and then extract the above information after that number into a csv file in the order above. It is used for my invoices and therefore when I do an import from my accounts package it updates all the transactions.

An example would be I say put 5 invoices on with a ID nr's of 1, 2, 3, 4 & 5 and output to a csv file. When I run the query/macro? it looks at the table with the last ID nr and starts from 6 and so on

I just need the ones I have done today. It has to be the ID number as each invoice is put on it gives it a sequential number, the dates could be different for each invoice.

I hope I've explained myself:)

Thanks in advance

Cheesey

View 1 Replies View Related

Storing Calculated Fields In A Table

Apr 20, 2007

I know that it is bad form to store a calculated field in a table - normalization and all that - but I can see no other way around a need that I have.

I'm trying to make a database to store injury time for employees. If an employee is injured, he can do light work for a certain amount of time, but this light work need not be contiguous. But, the total time on light work must be known so as to see when it is used up.

For example:

Bob is injured on 4/1/06 and goes on light work on 4/2/06 until 4/5/06 (4 days). Bob is then taken off light work until 4/10/06 when he reinjures the same injury. This does not count as a new injury, because it is an aggravation of the old one. So, Bob goes back on light work on 4/10/06 until 4/15/06 (6 days).

So, I need to store Bob's total time on light work for this injury (10 days) so that I can keep a running total to check against the maximum for a single injury. All I can think of is to store the sum of days on light work as a field in Bob's injury record, but that means storing a calculated field in a table.

Am I missing an easy way to do this, or is there a method to do what I want that I am just not aware of?

Thanx for any help!

View 2 Replies View Related

Storing Data From Textbox To Table

Jan 9, 2007

i have a form with two combo boxes cboMth and cboYr

i also have three text boxes in the same form with computed results: txtA,txtB,txtC.

now how can i store txtA,txtB,txtC with reference to the (Mth and Yr) into a table?

e.g: the table will looks this way (below)

===== ==== ==== ====
Mth/Yr txtA txtB txtC
===== ==== ==== ====
01/2007 580 683 93
:
:
:
06/2012 312 510 80
:
:

how shall i write the codes?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved