Hi, I am using the below email macro in Excel assigned to a form button, so the user hits the button and the spreadsheet is attached to an email with a specific address in the to field.
The macro I am using is (i got it from
The problem is that in the email that comes up, the "To" field is cutting off the ".uk" so all it says is "jbloggs@our-work.co". When I enter text in here without the dot it doesn't cut if off so it doesn't seem to be the number of characters, I am thinking perhaps it is formatted somehow to only accept email address from a certain country, whose domains end in only two letters, but not sure how to change this.
Thanks
John
"Stupid isn't not knowing the answer, it's not asking the question
The macro I am using is (i got it from
Code:
Sub Mail_workbook_1()
'Working in 97-2007
Dim wb As Workbook
Set wb = ActiveWorkbook
If Val(Application.Version) >= 12 Then
If wb.FileFormat = 51 And wb.HasVBProject = True Then
MsgBox "There is VBA code in this xlsx file, there will be no VBA code in the file you send." & vbNewLine & _
"Save the file first as xlsm and then try the macro again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
wb.SendMail "jbloggs@our-work.co.uk", _
"ARMS Report Request"
On Error GoTo 0
End Sub
The problem is that in the email that comes up, the "To" field is cutting off the ".uk" so all it says is "jbloggs@our-work.co". When I enter text in here without the dot it doesn't cut if off so it doesn't seem to be the number of characters, I am thinking perhaps it is formatted somehow to only accept email address from a certain country, whose domains end in only two letters, but not sure how to change this.
Thanks
John
"Stupid isn't not knowing the answer, it's not asking the question