sending a formatted excelsheet under condition

ransg

New member
Local time
Today, 20:35
Joined
Feb 10, 2009
Messages
4
Hello


I have allready this code which sends a snapshot report to some people. Depending on the condition the right person receives t
he right stuff.

Set rs1 = db1.OpenRecordset(sqlstr)


Pbname = rs1.Fields("PB")
pbsuject1 = rs1.Fields("TypeOfClient")
pbsuject2 = rs1.Fields("Client")
pbsuject3 = pbsuject1 & " " & pbsuject2
Pbfirstname = rs1.Fields("Firstname")
strcontents = "Dear " & Pbfirstname & "," & vbCrLf & vbCrLf & "You will find our proposition about " & pbsuject3 & "." & vbCrLf & vbCrLf & "Kind reagards, " & vbCrLf & "John"

Select Case (rs1.Fields("PB"))
Case "Patrick"

DoCmd.SendObject acReport, "RPT_RADI1", SnapshotFormat(*.snp)", "VBRAR", "VHERO", "", pbsuject3 & " - RADI tot EVVD", strcontents, True

Case "Peter" ...


This works fine. Now I have created by code an excel sheet (fully formatted) which contains the same data. How c
an I send it using the same methodology?
 

Users who are viewing this thread

Back
Top Bottom