Modules & VBA :: Choosing Specific Font For Emails

Jan 30, 2015

I would like to have Access launch an Outlook email with a specific font (Arial). How could that be accomplished?

Here's my code:

Private Sub cmdEmailAO_Click()
On Error Resume Next
Dim OApp As Object, OMail As Object, signature As String, Email As String, FirstName As String
Set OApp = CreateObject("Outlook.Application")
Set OMail = OApp.CreateItem(0)

[Code] ....

View Replies


ADVERTISEMENT

Making Some Specific Records With Different Font Style

Nov 18, 2007

Hi ,I have to make some specific records in a table in bold.Can any body suggest me how to make a particular record in bold or set some color fonts in order to high light the record.
I have to design a report which shows some priority records with different font style in ms access

Regards
sam

View 5 Replies View Related

Making Some Specific Records With Different Font Style

Nov 19, 2007

Hi ,I have to make some specific records in a table in bold.Can any body suggest me how to make a particular record in bold or set some color fonts in order to high light the record.
I have to design a report which shows some priority records with different font style in ms access

Regards
sam

View 2 Replies View Related

Show All Records... Highlight Specific Data Using Red Font

Mar 6, 2008

Microsoft Access 2003

One more question... I'm loving Access... much more than Lotus Approach!! :-) Here's something I've wanted to do in Approach... how do I do this in Access???


REPORT showing all customers

1. John Doe, owes 9.00
2. Jane Kane, owes 10.00
3. Rob Johnson, owes 30.00
4. Albert Icar, owes 22.00
5. Johnny James, owes 5.00

Query all customers owing more than 10.00 (in this example it would be Rob and Albert).

In the report, I want Rob and Albert's name to be red font only, while everyone else is just regular black font.



Thanks to all posters who have assisted me thusfar, and anyone that can help with this.

View 1 Replies View Related

Modules & VBA :: Exporting Data By ID To Excel - Choosing Special Time

Sep 12, 2013

I Export data by ID from Access to Excel.

Is it possible that two mgsbox will Show up, where the user can put in the timeperiod.

The time period would be the starting day of the contract.

It's called inception_date

Code:
Private Sub Befehl1_Click()
Dim xlApp As Object 'Excel.Application
Dim xlBook As Object 'Excel.Workbook
Dim xlSheet As Object 'Excel.Worksheet
Dim rstID As DAO.Recordset, tmpStr As String
Dim rstGr As DAO.Recordset, strSQL As String

[Code] ....

View 2 Replies View Related

Font Type In Form Changes When Change Font Colour

Aug 1, 2014

I am experiencing a problem in MS Access 2013. I have a form which was working just fine until now. It has form labels in Calibri font and their font colour is one shade lighter than black. Today, I changed the font colour of the form labels to be Automatic - black (shows as 'Text 1' colour in the form properties). I did this in Design view.

I find that when I switch to layout view, the font of the labels appears as Century Gothic. This is the font that appears in the Form view. So while the font colour is correctly changed, the font name is not what I had set in the Design view. When I go back to the Design view, and change the font colour back to the original colour which was one shade lighter than black (Text 1, Lighter 50%), the font is correct in the Layout view and the Form view (Calibri).

So it seems that there is some sort of binding between the font colour (black) and the font name (Century Gothic). When I change the font colour, the font also changes. When I restore the original colour (one shade lighter than black), the font Calibri is correctly retained.

View 4 Replies View Related

Modules & VBA :: Controlling Font Within A String

Jul 20, 2015

I have spent the better half of the afternoon researching how to accomplish controlling a bold font in a string I am building and sending to Excel.

Code:
' set text for safety hazards and controls
Concretetxt = "Concrete Demolition & vbCrLf & Hazards - dust, flying debris and skin Irritation. & vbCrLf & Control - Respirator, goggles, gloves, inspect equipment prior to use."
Excavationtxt = "Excavations & vbCrLf & Hazards - Damage to underground wires, collapse, falling materials/equipment. & vbCrLf & Control - Ensure utilities have been marked and hand dig when in close proximity, shore properly, Keep clear when lowering materials."

This is a sample of how the strings will build. I will select a task like Concrete Demolition and string it together with other tasks I would like "Concrete Demolition" in bold with the blurb following it then the next task would follow with a bold heading.

My thought is now that it may be easier to control by putting this data into a table instead of building the strings.

View 2 Replies View Related

Modules & VBA :: Concatenating Emails Into A String Via SQL

Sep 3, 2013

There are so many threads on here for emailing a PDF version of a report. I've put together a nearly complete bit of VBA that will do what I want - except for one thing.

Basically I have a personnel table with an email field. I Also have a field that details if a person is available or not ("Home" means they are available)

I need to create a string that is comprised of all the email addresses of the personnel who are "Home". In another thread I read that this can be done using a SQL statement.

So this is the VBA that I have so far - I commented the SQL for now because I don't quite know how to use it here.

Also, I have created the string, called "emailsList"

Code:
Private Sub Email_Button_Click()
'SELECT Personnel_Table.Email FROM Personnel_Table WHERE (((Personnel_Table.Status)="Home"));
Dim emailsList As String
DoCmd.SendObject acReport, "AWACT_Report", acFormatPDF, emailsList, , , "Training Update", "Attached is the newest Training Report.", True
End Sub

Do I need to do a loop that concatenates?

View 11 Replies View Related

Modules & VBA :: Text Font Color Based On Tab Selected?

Aug 8, 2014

We have a navigation page with 5 tabs and several navigation buttons underneath their respective tabs linking to reports.

In the main part of the navigation page we have 17 search parameters (text boxes and combo boxes)that the user can use to sort through all the reports we have in the different tabs.

What we would like to do is to have the label text to change to "red" if one of the 17 fields are "required", remain "black" if it is included in the report but not a mandatory search parameter, or turn "light grey" if that parameter is not included in that report.

For example:

My search parameters are: people, phone, and cars

If I were looking at a report of people that included addresses, phones, etc...name and phone would be required search parameters. However, even though I can search by car, it is not in this particular report and the label text should be greyed out. (If the actual text box could go inactive that would be even better).

I have read about buttons being turned colors based on a drop down box choice, but I have not been able to find anything about using a navigation tab subform button to make the colors change in the main navigation form.

View 14 Replies View Related

Modules & VBA :: Edit Font Color Based On Field Value & Age

Mar 4, 2015

I am attempting to adjust the font color of a date field on a report based on the value of two other fields. I have the below code set in the "On Format" property of my detail section - however it does not work when I open the report to view.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Frequency = "Annually" Then
If Me.ClassDate < (DateAdd("yyyy", -1, Date)) Then
Me.ClassDate.ForeColor = vbRed
Me.ClassDate.FontBold
End If
End If
End Sub

View 1 Replies View Related

Modules & VBA :: Run Time Error 287 When Sending Emails

Dec 20, 2013

I have the following code in a module that sends out various email updates to me when I'm off site. On my PC it works perfectly whether I have Outlook open or not. I've installed the database on several other machines, but I'm getting a Run Rime Error 287 on the .Send line if the user has Outlook closed. Any setting somewhere in Outlook or Access that needs changing? Or is there something that can be changed in the code to ensure the email sends whether Outlook is open or not?

Code:
Public Sub SendEmailNotification(strSubject as String, strMessage as String, strAddress as String)
Dim olEmailApp As Object
Dim olMsg As Object
Dim strEmailBody As String
Set olEmailApp = CreateObject("Outlook.Application")
Set olMsg = olEmailApp.CreateItem(0)

[Code] ....

View 1 Replies View Related

Modules & VBA :: Sending Multiple Emails Using Outlook

May 7, 2015

Using Access 2010; I have code that generates multiple emails to send using outlook. It works fine except that all emails go to my draft folder and I have to go the outlook and send them individually. This is fine when I have under 10 emails; but sometime it can get up to 50 or even 100 emails. What I have to do to send them from my draft all at once. The emails go to draft to inspect for errors.

View 1 Replies View Related

Modules & VBA :: Number Of Unread Outlook Emails

Aug 4, 2014

I need to write a vba code that tells me number of unread and incoming emails in an inbox in outlook. I managed to link to inbox in outlook, but all I need now is to write the code to give me:

a) number of unread emails
b) fill some of unread emails details (like name, from) in a listbo

View 1 Replies View Related

Modules & VBA :: Search CSV To Find Specific Statement / Text On Specific Line?

Jul 8, 2015

how to read a specific line in a CSV file (using VBA), to see if the phrase "There are no records available." is present.

If it is present, then I'm going to do a debug.print stating that there are no records to load - and then the script will move on to the next file. If the phrase isn't present, then I'm going to upload the file to Access, parse the information, and then upload it to a CRM. (I already have the latter portion of the code up and running....I just need to account for the first part, where I can determine if the file has data or not).

The structure of the file never changes. The first row is composed of eight column headers (Post Date, Card Number, Card Type, Auth Date, Batch Date, Reference Number, Reason, Amount) and (if) the phrase "There are no records available." is present, it will show up on the second row, in the first column (under Post Date).

View 3 Replies View Related

Modules & VBA :: Send Emails To Defined Array Of Recipients Using CDO

Sep 18, 2013

I am trying to send emails using CDO to an array of recipients loaded from a query. I have made this work using Lotus Notes so i know the first part of my code is correct, and the current code I have works when I input an actual email address. But when I try to add the Array name into the 'To' field I get a data mismatch error.

View 3 Replies View Related

Modules & VBA :: Retrieve Count Of Emails In Outlook Subfolders

Jun 28, 2014

I need to retrieve the count of emails in a shared exchange mailbox in Outlook 2010. I found the following software that retrieves the count I need, but only in default folders or ones that are 1 layer deep. The folder I need is two layers deep Mailbox -> Inbox -> Completed. Is there anyway to drill down just one more level?

Const olFolderInbox = 6
Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objInbox = objNamespace.GetDefaultFolder(olFolderInbox)

[code]....

View 6 Replies View Related

Modules & VBA :: Loop Through Query Results To Output Emails

Jan 29, 2015

I have a query that randomly selects records from my table:

SELECT TOP 6 *
FROM SM_Import
ORDER BY rnd(INT(NOW*id)-NOW*id);

I would like to loop through those results, and create emails

I can get one email formed (displayed) with the code below but don't know how to get both working together to display the (6) emails:

Private Sub Command3_Click()
Dim ol As Object
Dim CaSubject As String

[Code].....

View 4 Replies View Related

Modules & VBA :: Update Subject Of Emails In Outlook That Have Already Been Received

Jul 22, 2014

I'm trying to automate some processes. My company uses Outlook 2010 and every day we need to go into our "Sent" folder and rename the Subject line of all of our sent emails. We change the subject to a standardized format depending on the content of the email and who the email was sent to. These are then used as part of an equation to tally our Transactions Per Hour. (TPH)

I've already designed a small Access 2010 utility to track the TPH, but I would like to add the functionality to parse some data from the subject lines of my "Sent" folder, and automatically make changes to save some time.

Here is my thought process:

- Click "Process Sent Emails" button from TPH utility.
- Access runs through each email in the "Sent" folder (or perhaps only selected emails) and changes the Subject line per simple Select Case criteria (I can figure that part out).

View 2 Replies View Related

Modules & VBA :: Create Emails And Manage Replies In Access 2010

Jan 25, 2015

I found the below link that looks great and works.

[URL] ....

Te only thing is that I don't have much control over it and would like to build something similar as we also need to work with access 2003 (still )Any way to find how the code works (if there is some of it hidden in access)?

View 6 Replies View Related

Modules & VBA :: Create A Recordset For Multiple Emails And Send One Email

Mar 17, 2014

I have some code that takes from a query, an email address and sends out an email.Due the security warning that happens for each individual email, i want to create ONE email for all email address in the query and populate them to the BCC section of the sendobject.Here is the code that I currently use

Code:
Private Sub cmdSendEmail_Click()
Dim MyDB As DAO.Database
Dim rsEmail As DAO.Recordset
Dim sToName As String
Dim sSubject As String
Dim sMessageBody As String

[code]...

I want to populate the BCC field with multiple emails addresses seperated by ":" and send just one email.

View 4 Replies View Related

Modules & VBA :: Selecting Recipients From A Table For Sending Emails? Access 2007

Jul 19, 2013

In an Access 2007 module, is there a way of sending an email to a list of people stored as a list in a table in the database, rather than having to put all the names into the function?

I have a function I'm using to generate and send out an email to certain people, but the list is constantly growing so I'm looking for a better way to manage it! The main issue is having to kick users out of the database every time I need to update the recipients list... because it's stored in the code.

If I create a simple table containing all the names, how could I then ask it to use that instead?

This is the function I'm using currently - found on here and adapted to my own purposes

Syntax to use for the function: SendNotesMail "recipients", "Body Message", "Additional Text", "Subject"

Code:
Public Function SendNotesMail(strSendTo As String, strBody As String, strExtraText As String, strSubject As String)
'This public sub will send a mail and attachment if neccessary to the recipient including the body text and additional comments from the Active record
DoCmd.OutputTo acOutputReport, "REP09emailnotification", acFormatRTF, "x: endersgroup tendering databaseTenderUpdate.rtf", False
Dim Subject As String
Dim Attachment As String

[Code] ....

So I guess my question is: how do I get my recipients from a table into the strsendto?

View 5 Replies View Related

Modules & VBA :: Requirement To Break Bulk Emails Into Smaller Groups For Transmission

Mar 10, 2014

I have put together a VBA sub to run Outlook.Application to send a report to selected email addresses. A Table's records contain an email addresses as well as category for grouping purposes.

I use a "Create Table Query" to extract the selected email addresses from the table into a temporary table called "ETransferAddress" then "Set rst = CurrentDb.OpenRecordset("ETransferAddress")" then concatenate the email addresses separated with commas.

This works fine for small groups, but the service provider blocks them if the number of email addresses go into the hundreds.

What I need is to break the email addresses into sub groups and then create a series of emails all with the same Report, Subject and Content.

One way might be to create a series of loops to create a number of smaller tables but to string that lot together to achieve it is beyond me at present.

Here is my code to date"

Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim strPath As String
Dim strFilter As String
Dim strFile As String
Dim rst As DAO.Recordset
'Create a table with selected addresses

[Code] .....

View 2 Replies View Related

Modules & VBA :: Sending Emails To Multiple People Based On Same Query And Report

Jul 15, 2013

At present I have a tblData, a tblPeople, a long union query and a report that displays its results. On a form I select a person from tblPeople (another field on that table contains their email address), run the query and report in that person's respect and email the results to them.

What I want to do is add a button which runs some VBA code which cycles through tblPeople, runs the query for each person, works out if the query has returned any records from tblData for that person, and if so - sends them the report.

I am using Access 2010

View 4 Replies View Related

Modules & VBA :: Auto Create Emails In Outlook Based On Data In Access?

Apr 20, 2015

I have a table called Contacts in Access:

ID Email
001 email1
002 email2
003 email3
004 email4
008 email5
010 email6

And I have a table called Data in Access:

ID Date Person Title Yes/No Action
001 20/4 Mr A Consultant
001 20/4 Mr B Supervisor
001 20/4 Mr C Consultant
004 20/4 Mr D Consultant
010 20/4 Mr E Consultant
010 20/4 Mr F Supervisor

What I'm looking for is coding that would start with the first ID number in CONTACTS and see if there is the corresponding ID in DATA. If there is, then I want it to create an Outlook email and have:

1.To field populated with the email address in the CONTACTS table

2.From and CC fields to be my email address

3.The subject line needs to read [ID] "Request" and then today's date backward (e.g. 20150420).

4.The body I need to put some generic wording and then a table with the records from the DATA table (first 5 fields plus the headings).

5. The format of the table etc isn't important as long as it is a table format

If it's created the email I want it to go back to the DATA table and put "Email Created" in the Action column for those IDs.

I don't want the email to automatically send; I only want it to create a draft (as this data needs to be manually confirmed before sending).

If for example it gets to checking in DATA table for ID 002 (and as seen there's none there), I want it to skip creating the email and move on to the next ID.

In the end I would expect to see 3 draft emails open in Outlook ready to be sent, looking something like the below (just 001 below)?

From... my email
To... Email1
CC... my email
Subject: 001 Request 20150420

action the below:

ID Date Person Title Yes/No
001 20/4 Mr A Consultant
001 20/4 Mr B Supervisor
001 20/4 Mr C Consultant

And the DATA table look like this (if only 001 email was created):

ID Date Person Title Yes/No Action
001 20/4 Mr A Consultant Email created
001 20/4 Mr B Supervisor Email created
001 20/4 Mr C Consultant Email created
004 20/4 Mr D Consultant
010 20/4 Mr E Consultant
010 20/4 Mr F Supervisor

I will need to add more data to the CONTACTS table over time, also the DATA table will be different each day so I need the coding to accomodate for both of these possibilities.

View 9 Replies View Related

Choosing Different Options

May 2, 2006

I am trying to make a form that will allow me to make several selections and run a report. I want to be able to select from a list of Grade Levels, 9th, 10th, 11th and 12th. After I have picked my grade level or selected more then 1 grade level I want to be able to choose from a drop down list of school district. After I have choosen my grade level and my school district I want to run my report. How do I do that?

View 4 Replies View Related

Choosing Addresses

Sep 28, 2007

Hello everyone. I hope you are well. I am new to this forum and need some help with access.

I have a database which records an organisations addresses. There is the main address, where the activity takes place, and then there is the postal address, which is often different. What I want to be able to do is to select all the organisations in one town (e.g. Town1), but send information in the post to their postal address (Town2).

Is this something that can easily be done? I hope somebody can help me (especially with some user friendly terms).

Many thanks,

Chadder

View 10 Replies View Related







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