I have sent a message because I didnt really understand your last post. Very much my lack of knowledge. I have had a go at designing a form and adding a couple of buttons .
I have managed to do the simple stuff like
1. create the Form
2. create a "show Button"sheet One called GPU Journal Form
3.added code to the "clear Search Button"which clears the Provider Field
4.Added combo buttons and added text to be selected
5.added code to the "clear Form "button
This is the extent if my expertise considering I hadn't done any VBA until my first post
Now the tricky part which I hope you can assist me with I require. Probably super easy for you
1.The light blue search button to search for providers in the "data "sheet and populate the "name"and "email Text"boxes
2.The Email Button to email the provider as per their email address in the 'email "textbox . based on the search
I had found previous code to do this See below
It would be great that once the Email button is activated the form is emailed to the provider with :
1. a subject Line -GPU E Journaling
2.Body of email text "
"Please find attached items for your attention.Please make corrections ASAP.
SentOnBehalfOfName = "Health.XXXXXXXXXXXXXXXX"
Maybe a msg box email sent would be a nice touch???
Again I hope that you can assist and thank you for all of your efforts
Public Sub ProsegurEmail() Dim destFolder As String, PDFfile As String Dim printRange As Range Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dim strbody As String Dim sTO As String, sSubj As String Set OutApp = New Outlook.Application sTO = [C6] sSubj = [J1] 'PDF file for print range is temporarily saved in same folder as this workbook destFolder = ThisWorkbook.Path & "\" If Right(destFolder, 1) <> "\" Then destFolder = destFolder & "\" If ActiveSheet.PageSetup.PrintArea <> "" Then 'Save print area for active sheet as a PDF file, file name from cell A2 PDFfile = destFolder & ActiveSheet.Range("C6").Value & ".pdf" Set printRange = Range(ActiveSheet.PageSetup.PrintArea) printRange.ExportAsFixedFormat Type:=xlTypePDF, Filename:=PDFfile, _ Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False 'Send email to address in cell C6 of active sheet with PDF file attached If Not sTO Like "?*@?*.?*" Then Exit Sub Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = sTO .CC = "" .Subject = "GPU Journaling" strbody = "<H3><B>Dear Student</B></H3>" & _ "Please find attached items for your attention.Please make corections ASAP.<br>" & _ "<br>" & _ "<A HREF=""""></A>" & _ "<br><br><B>Thank you</B>" .HTMLBody = strbody & "<br>" & .HTMLBody .Attachments.Add PDFfile .SentOnBehalfOfName = "Health.XXXXXXXXXXXXXXXX" .Display End With 'Delete the temporary PDF file Kill PDFfile Set OutMail = Nothing Set OutApp = Nothing End If End Sub