Hi

Is there a way to stop the vba code or button names form changing when the document is emailed?

My form have 5 buttons in total.

1st Button sends the attached the document to designated email address then closes the form.
2nd button allows the person receiving the form to send onto next person
3rd button should send on to next person
4th button sends back to 2nd person if declined
5th button sends back to designed people to state its accepted
6th button sends back to designed people to state its declined.

'Submission from ward to SNM'

Private Sub Submit_Click()
Dim OL As Object
Dim EmailItem As Object
Dim Doc As Document

Application.ScreenUpdating = False
    Set OL = CreateObject("Outlook.Application")
    Set EmailItem = OL.CreateItem(olMailItem)
    Set Doc = ActiveDocument
    Doc.Save
    
With EmailItem
    .Subject = "PPH Request Form for Off Contract Agency from Ward Sister/Charge Nurse"
    
    'Email content that will be send once button is clicked'
    
    .Body = "Hi," _
            & vbCrLf & " " & vbCrLf & "Please see attached a copy of my request Form for Off Contract Agency, sent on: " & Date _
            & vbCrLf & " " & vbCrLf & "Many Thanks" _
            & vbCrLf & " " & vbCrLf & "Ward Sister/Charge Nurse"
            
    .to = "" 'Senior Nurse Manager'
    .Importance = olImportanceHigh
    .Attachments.Add Doc.FullName
    .Send
    
'Message to say it has sent'

    If Err = 0 Then MsgBox "Email sent successfully to Senior Nurse Managers. When you click 'OK' this form will close."

Application.ScreenUpdating = True

Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing

'Close doc after sending'

On Error GoTo errorHandler
ActiveDocument.Close _
 SaveChanges:=wdPromptToSaveChanges, _
 OriginalFormat:=wdPromptUser
errorHandler:
If Err = 4198 Then MsgBox "Document was not closed"
End With
End Sub

'submission from SNM to Escalation Email'

Private Sub Submit11111_Click()
Dim OL As Object
Dim EmailItem As Object
Dim Doc As Document

Application.ScreenUpdating = False
    Set OL = CreateObject("Outlook.Application")
    Set EmailItem = OL.CreateItem(olMailItem)
    Set Doc = ActiveDocument
    Doc.Save
    
With EmailItem
    .Subject = "PPH Request Form for Off Contract Agency from Senior Nurse Manager"
    
    'Email content that will be send once button is clicked'
    
    .Body = "Hi," _
            & vbCrLf & " " & vbCrLf & "Can we please escalate the attached shift?" _
            & vbCrLf & " " & vbCrLf & "By sending this form on to the escalation email, I confirm that it has been reviewed and I agree with the requested escalation made by the ward." _
            & vbCrLf & " " & vbCrLf & "Many Thanks" _
            & vbCrLf & " " & vbCrLf & "Senior Nurse Manager"
             
    .to = "" 'Escalation Email and HON'
    .Attachments.Add Doc.FullName
    .Send
End With

'Message to say it has sent'


If Err = 0 Then MsgBox "Email sent successfully to Senior Nurse Managers. When you click 'OK' this form will close."
    
Application.ScreenUpdating = True

Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing

'Close doc after sending'

On Error GoTo errorHandler
ActiveDocument.Close _
 SaveChanges:=wdPromptToSaveChanges, _
 OriginalFormat:=wdPromptUser
errorHandler:
If Err = 4198 Then MsgBox "Document was not closed"

End Sub

'Submission from Escalation Team to Bank/SNM'

Private Sub Submit2_Click()
Dim OL As Object
Dim EmailItem As Object
Dim Doc As Document

Application.ScreenUpdating = False
    Set OL = CreateObject("Outlook.Application")
    Set EmailItem = OL.CreateItem(olMailItem)
    Set Doc = ActiveDocument
    Doc.Save

With EmailItem
    .Subject = "Request Form for Off Contract Agency"
    
    'Email content that will be send once button is clicked'
   
    .Body = "Hi," _
            & vbCrLf & " " & vbCrLf & "Please accept this email as authorisation for the attached shift, to be escalated to TNS." _
            & vbCrLf & " " & vbCrLf & "Many Thanks" _
            & vbCrLf & " " & vbCrLf & "Escalation Team"
            
    .to = "" 'Bank and Senior Nurse Managers/HON'
    .Attachments.Add Doc.FullName
    .Send
End With

'Message to say it has sent'

    If Err = 0 Then MsgBox "Email sent successfully to the Bank Team and Senior Nurse Managers. When you click 'OK' this form will close."
    
Application.ScreenUpdating = True

Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing

'Close doc after sending'

On Error GoTo errorHandler
ActiveDocument.Close _
 SaveChanges:=wdPromptToSaveChanges, _
 OriginalFormat:=wdPromptUser
errorHandler:
If Err = 4198 Then MsgBox "Document was not closed"

End Sub

'Confirmation From Bank to Escalation Team/SNM, Shift is ok'

Private Sub Submit3_Click()
Dim OL As Object
Dim EmailItem As Object
Dim Doc As Document

Application.ScreenUpdating = False
    Set OL = CreateObject("Outlook.Application")
    Set EmailItem = OL.CreateItem(olMailItem)
    Set Doc = ActiveDocument
    Doc.Save

With EmailItem
    .Subject = "Request Form for Off Contract Agency"
    
    'Email content that will be send once button is clicked'
   
    .Body = "Hi," _
            & vbCrLf & " " & vbCrLf & "This email is to confirm that the attached shift has been escalated to TNS" _
            & vbCrLf & " " & vbCrLf & "Many Thanks" _
            & vbCrLf & " " & vbCrLf & "Bank Team"
            
    .to = "" 'Escalation and Senior Nurse Managers/HON'
    .Attachments.Add Doc.FullName
    .Send
End With

'Message to say it has sent'

    If Err = 0 Then MsgBox "Email sent successfully to the Escalation Team and Senior Nurse Managers. When you click 'OK' this form will close."

Application.ScreenUpdating = True

Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing

'Close doc after sending'

On Error GoTo errorHandler
ActiveDocument.Close _
 SaveChanges:=wdPromptToSaveChanges, _
 OriginalFormat:=wdPromptUser
errorHandler:
If Err = 4198 Then MsgBox "Document was not closed"

End Sub

'Shift not escalated by Escalation Team, send back to SNM on click'

Private Sub Submit2b_Click()
Dim OL As Object
Dim EmailItem As Object
Dim Doc As Document

Application.ScreenUpdating = False
    Set OL = CreateObject("Outlook.Application")
    Set EmailItem = OL.CreateItem(olMailItem)
    Set Doc = ActiveDocument
    Doc.Save

With EmailItem
    .Subject = "Request for off contract agency ecalation returned for by escalation team for review."
    
    'Email content that will be send once button is clicked'
   
    .Body = "Hi," _
            & vbCrLf & " " & vbCrLf & "At this time the escalation of the attached shift has been declined." _
            & vbCrLf & " " & vbCrLf & "The rationale for the decision made is noted on page 4 of the attached form." _
            & vbCrLf & " " & vbCrLf & "If you would like to resubmit the escalation for this shift, then please review the recommendation(s) in the form before resubmitting." _
            & vbCrLf & " " & vbCrLf & "Many Thanks" _
            & vbCrLf & " " & vbCrLf & "Escalation Team"
            
    .to = "" 'Senior Nurse Manager/HON'
    .Attachments.Add Doc.FullName
    .Send
End With

'Message to say it has sent'

    If Err = 0 Then MsgBox "Email sent successfully to the Senior Nurse Managers. When you click 'OK' this form will close."

Application.ScreenUpdating = True

Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing

'Close doc after sending'

On Error GoTo errorHandler
ActiveDocument.Close _
 SaveChanges:=wdPromptToSaveChanges, _
 OriginalFormat:=wdPromptUser
errorHandler:
If Err = 4198 Then MsgBox "Document was not closed"

End Sub

'Shift not escalated by Bank Team, send back to SNM on click'

Private Sub Submit3b_Click()
Dim OL As Object
Dim EmailItem As Object
Dim Doc As Document

Application.ScreenUpdating = False
    Set OL = CreateObject("Outlook.Application")
    Set EmailItem = OL.CreateItem(olMailItem)
    Set Doc = ActiveDocument
    Doc.Save

With EmailItem
    .Subject = "Request for off contract agency ecalation returned for by Bank team."
    
    'Email content that will be send once button is clicked'
   
    .Body = "Hi," _
            & vbCrLf & " " & vbCrLf & "At this time the escalation of the attached shift has been declined." _
            & vbCrLf & " " & vbCrLf & "The rationale for the decision made is noted on page 5 of the attached form." _
            & vbCrLf & " " & vbCrLf & "If you would like to resubmit the escalation for this shift, then please review the comment made in the form before resubmitting." _
            & vbCrLf & " " & vbCrLf & "Many Thanks" _
            & vbCrLf & " " & vbCrLf & "Bank Team"
            
    .to = "" 'Escalation and Senior Nurse Manager'
    .Attachments.Add Doc.FullName
    .Send
End With

'Message to say it has sent'

    If Err = 0 Then MsgBox "Email sent successfully to the Escalation Team and Senior Nurse Managers. When you click 'OK' this form will close."

Application.ScreenUpdating = True

Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing

'Close doc after sending'

On Error GoTo errorHandler
ActiveDocument.Close _
 SaveChanges:=wdPromptToSaveChanges, _
 OriginalFormat:=wdPromptUser
errorHandler:
If Err = 4198 Then MsgBox "Document was not closed"

End Sub