Frustrated VBA Newbie

M

Marc

Hello Excel VBA Gods or Goddes!

I need help with the following issue or if you can point me to a good
resource.

Problem: take a whole employee login list(1100+) and sort by
department email the part of the
list they goes to that department with outlook express.


Applications: Excel 2000, (XP)Outlook Express


Details:

Sheet1- Logins (list length is dyamic in nature with employee's
leaving or getting hired)

Starts at
A6: Lastname B6: Firstname C6: Username D6: Password E6: Employee
Number
F6: Dept.Number


Sheet2- Dept Heads (list length is dyamic in nature with ablity for
department growth)

Starts at A6: Dept. Number B6: Firstname C6: Lastname D6: Email
Address


Output in email:

to: <Email of department head>
Subject: Employee list for Dept. <insert dept. #>

Message Body:

Hello <Department Head Firstname>,

Below you will find a login list for your employee's in your
department.

<insert list in table or coloum form.
alphabetized Lastname,First Username password Employee #>

Note: Please do not post or allow other employees to see this list.

Thankyou,

Admin Team


==============================

So Any ideas? Your help is greatly appreciated!

~Marc
 
E

Earl Kiosterud

Marc,

Nothing straightforward comes to mind. You could write a macro to do it, but Excel doesn't
Excel for letter documents. Or maybe Word has a mail merge feature that will list stuff
from a second table -- I don't know of such a thing, though. Ask in a Word group.

This would be, I think, fairly straightforward with Access. Link the two sheets into
Access, and set up a relationship. The Employee (Login) table is the "related" or "many"
table -- the Dept table is the "one" table. Now set up a Query with all the fields you need
from the two related tables. Make a Report for your letter, using the query as the data
source, grouping on Department. This stuff is all quickly done in Access.
 
Top