Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all ,
present we are using some macro expression using this we are sending sheets& sheet objects to user mails but in those sheets& sheet object we are not finding the sheet object title and sheet title name ,
user need to see the sheet object title name and sheet title name.
2nd requierment: using below code we are sending only entire one sheet and one sheet objct, we need to send more sheets and monre sheet objects using one button...
please help me how to approach to this.
please find the below code, using this we are export the data via emal.
Sub ExportEmail
set obj=ActiveDocument.GetSheetByID("SH01")
set obje = ActiveDocument.GetSheetObject("CH01")
obj.ExportBitmapToFile "C:\\...\textimage.jpg"
obje.ExportBitmapToFile "C:\\..\textimage1.jpg"
MsgBox "Exported"
'End Sub
'//Object creation
Set objMsg = CreateObject("CDO.Message")
Set msgConf = CreateObject("CDO.Configuration")
'// Server Configuration
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "**.**.**.**"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
'msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = ""
'msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = ""
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
msgConf.Fields.Update
' Email
objMsg.Subject = "Export & Import"
objMsg.To = "to mailid"
objMsg.From = "from maild"
objMsg.HTMLBody = "<html><body>Embedded Image:<br><img src=""E:\\TestImageJPG.jpg""></body></html>"
Set objMsg.Configuration = msgConf
' Send
objMsg.Send
Msgbox("Email Sent")
' Clear
Set objMsg = nothing
Set msgConf = nothing
End Sub
Hi ravindra ,
Did you get the solution? if yes, can you post or explain the solution