Advertisement

09.25.2008 at 08:35AM PDT, ID: 23762920
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.9

Add image to attached code

Asked by KeirMcCann in Microsoft Excel Spreadsheet Software, Visual Basic Programming

Tags: , ,

I wish to attach our company logo to the macro that is sent out every day.  The code is attached and the logo would be hosted on our domain so it would be  url reference.

Thanks

KeirStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
Option Explicit
 
 
Sub ProcessAbsentees()
    Dim dt As Date
    Dim rw As Long
    Dim col As Integer
    Dim rowcount As Long
    Dim rng As Range, pRange As Range, C As Range, p As Range
    Dim firstAddress As String
 
    With ThisWorkbook.ActiveSheet
        dt = Date
        rw = .Range("B" & ActiveSheet.Rows.Count).End(xlUp).Row
        Set rng = .Range("a3:z3")
        Set rng = rng.Cells.Find(dt, LookIn:=xlValues).Offset(0, 1)
        Set rng = Range(Cells(7, rng.Column), Cells(ActiveSheet.UsedRange.Rows.Count, rng.Column))
 
        With rng
            Set C = .Find("N", , xlValues, xlWhole)
            If Not C Is Nothing Then
                firstAddress = C.Address
                Set pRange = C
                Do
                Set C = .FindNext(C)
                    Set pRange = Union(C, pRange)
                Loop While Not C Is Nothing And C.Address <> firstAddress
            End If
            
                      
            For Each p In pRange
                Cells(6, rng.Column - 1).FormulaR1C1 = "=SUMPRODUCT((R[1]C:R[200]C=R[" & p.Row - 6 & "]C)*(R[1]C[1]:R[200]C[1]=""Y""))"
                Call MailEm(p.Offset(0, -1).Value, Cells(p.Row, "A").Value, Cells(6, rng.Column - 1).Value)
            Next
 
        End With
        Cells(6, rng.Column - 1).Clear
    End With
End Sub
 
Sub MailEm(siteName As String, empName As String, empNum As String)
    Dim olApp    'As Outlook.Application
    Dim olNS    'As Outlook.Namespace
    Dim mai    'As mailitem
    Set olApp = CreateObject("outlook.application")
    Dim siteList As Range, C As Range
    Dim oContact As String, OContactTel
 
    Set siteList = ThisWorkbook.Sheets("Site List").Columns("B:B")
    Set C = siteList.Find(siteName, , xlValues, xlWhole)
 
    If Not C Is Nothing Then
        oContact = C.Offset(0, 2)
        OContactTel = C.Offset(0, 3)
    Else
        oContact = "absences@advent.local"
    End If
 
    If OContactTel = "" Then OContactTel = "XXXXX"
 
    Set mai = olApp.CreateItem(0)
    mai.To = oContact
    mai.Subject = C.Offset(0, -1) & " Abscenses " & Date
    mai.Body = "Hi " & C.Offset(0, 1) & "," & vbCrLf & vbCrLf
    mai.Body = mai.Body & "Unfortunately " & empName & " has called in sick this morning however there will still be " & empNum & " other operatives on site.  Our apologies for any inconviniencies this may cause,   a representative from Advanced Ventilation will contact you after 9:00am on " & OContactTel
    mai.Body = mai.Body & vbCrLf & vbCrLf & "Kind Regards" & vbCrLf & vbCrLf & "Advanced Ventilation - In Partnership with Nuaire"
    mai.Body = mai.Body & "Tel: (01204) 523384"
    mai.Body = mai.Body & "Fax: (01204) 389849"
    mai.Body = mai.Body & vbCrLf & vbCrLf & vbCrLf & vbCrLf & "This is an automated email to use an alternative email for this information please contact Adanced Ventilation"
       
    mai.Send
 
    Set mai = Nothing
    Set olApp = Nothing
 
End Sub
[+][-]09.25.2008 at 09:14AM PDT, ID: 22570975

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 09:20AM PDT, ID: 22571040

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 09:24AM PDT, ID: 22571093

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 09:35AM PDT, ID: 22571222

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 09:37AM PDT, ID: 22571254

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 09:39AM PDT, ID: 22571271

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 09:41AM PDT, ID: 22571291

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, Visual Basic Programming
Tags: Microsoft, Excel, 2007
Sign Up Now!
Solution Provided By: pkhari
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.28.2008 at 09:09AM PDT, ID: 22591603

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628