vba print to use company letterhead

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
672
Office Version
  1. 365
Platform
  1. Windows
hi
i have code to send email and then to print.
this is a bit wrong as the printout should not have the email sender as the letterhead
how do i tell the code to print the information on a letterhead, i have the letterhead saved as an excel spreadsheet called group 29 or on a word document.
the message gets sent as part of macro2
shall i create a macro3 or can it be part of the same macro just print differently?
do you need to see the entire code before replying?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
hi
here it is

Private Sub Worksheet_Change(ByVal Target As Range)
Macro1 Target 'event runs when cell in Column Q is added
Macro2 Target 'event runs when cell in Column P is added

End Sub


Private Sub Macro1(ByVal Target As Range)
If Target.Column = 17 And Target.Cells.Count = 1 Then

If Target.Value <> "" Then
Cells(Target.Row, "R").Value = Date

End If
End If
End Sub



Private Sub Macro2(ByVal Target As Range)

If Target.Column = 17 And Target.Cells.Count = 1 Then

If Target.Value <> "" Then


result = MsgBox("pressing OK will send email to notify", vbOKCancel + vbExclamation, "Missing Approval")

If result = vbCancel Then SaveUI = True

If result = vbOK Then


Set OutlookApp = CreateObject("Outlook.Application")
Set OlObjects = OutlookApp.GetNamespace("MAPI")
Set newmsg = OutlookApp.CreateItem(olMailItem)

On Error Resume Next

newmsg.Recipients.Add (Cells(Target.Row, "Z").Value) ' Add Recipients
newmsg.Recipients.Add (Cells(Target.Row, "AA").Value)
newmsg.Subject = Cells(Target.Row, "B").Value & " Reimbursement" ' Add Subject
newmsg.Body = "This is to inform you that payment has been processed " & _
"on behalf of " & Cells(Target.Row, "B").Value & "." & vbCrLf & "" & _
"Check # " & Cells(Target.Row, "P").Value & " was issued " & " for the amount of " & "$" & Cells(Target.Row, "Q").Value & " for services in the month of " & Cells(Target.Row, "C").Value & " for " & Cells(Target.Row, "F").Value & Cells(Target.Row, "G").Value & ", " & "(" & "billed amount " & "$" & Cells(Target.Row, "K").Value & ")." & vbCrLf & "" & _
"(If Check amount is greater than billed amount, this check contains multiple receipts and reimbursement requests.)"
newmsg.Send 'Send Email
newmsg.PrintOut


End If
End If
End If

End Sub
 
Upvote 0
my code ends with
newmsg.Send 'Send Email
newmsg.PrintOut

can i designate the printout to be added to a letterhead that was imported into excel as cells C2:I6?
can i add the letterhead to the email as well?
 
Upvote 0
can i save my letterhead to the spreadsheet in use as a merged unit a1:h4 and then refer to that as part of my print?
 
Upvote 0

Forum statistics

Threads
1,214,540
Messages
6,120,107
Members
448,945
Latest member
Vmanchoppy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top