NearImpossible
Registered User.
- Local time
- Yesterday, 22:22
- Joined
- Jul 12, 2019
- Messages
- 225
I have a bit of code that searches through some records and generates emails based off of the results, but for some reason, when the email is generated, it is adding a carriage return or something that is making txt drop to the next line and I can't seem to figure it out.
Here is the bit of code that is giving me issues
Result of nmt is This is a reminder that your Server and Kiosk maintenance is scheduled for
Result of mday is Friday
Result of Format(DateAdd("d", (nos), Date), "mm/dd") is 07/17
Result of mtm is 11:00:00 AM CST
Result of nms is
The maintenance typically takes about 30 minutes, but we like to scheduled 1 hour in case we run into any issues. We will reach out prior to rebooting the server as your program will not be available while it is rebooting.
If you need to reschedule, please reply to this email and let us know
Thank You
and the result of the " nmt & " " & mdy & " " & Format(DateAdd("d", (nos), Date), "mm/dd") & " at " & mtm &"."& " " is being split on 2 lines instead of 1 so the email reads as follows
This is a reminder that your Server and Kiosk maintenance is scheduled for
Friday 07/17 at 11:00:00 AM CST.
The maintenance typically takes about 30 minutes, but we like to scheduled 1 hour in case we run into any issues. We will reach out prior to rebooting the server as your program will not be available while it is rebooting.
If you need to reschedule, please reply to this email and let us know
Thank You
I have verified that I don't have any extra lines in any of the fields in my tables
Here is the bit of code that is giving me issues
Code:
'Opens and starts email
Set oOutlook = CreateObject("Outlook.application")
Set oEmailItem = oOutlook.CreateItem(olMailItem)
With oEmailItem
.SentOnBehalfOfName = "SENDER"
.To = "RECIPIENT"
.Subject = fac & " Scheduled Maintenance on " & mdy & " " & Format(DateAdd("d", (nos), Date), "mm/dd") & " at " & mtm
.HTMLBody = nmt & " " & mdy & " " & Format(DateAdd("d", (nos), Date), "mm/dd") & " at " & mtm &"."& "<br><br>" & nms
.display
' .Send
End With
Result of nmt is This is a reminder that your Server and Kiosk maintenance is scheduled for
Result of mday is Friday
Result of Format(DateAdd("d", (nos), Date), "mm/dd") is 07/17
Result of mtm is 11:00:00 AM CST
Result of nms is
The maintenance typically takes about 30 minutes, but we like to scheduled 1 hour in case we run into any issues. We will reach out prior to rebooting the server as your program will not be available while it is rebooting.
If you need to reschedule, please reply to this email and let us know
Thank You
and the result of the " nmt & " " & mdy & " " & Format(DateAdd("d", (nos), Date), "mm/dd") & " at " & mtm &"."& " " is being split on 2 lines instead of 1 so the email reads as follows
This is a reminder that your Server and Kiosk maintenance is scheduled for
Friday 07/17 at 11:00:00 AM CST.
The maintenance typically takes about 30 minutes, but we like to scheduled 1 hour in case we run into any issues. We will reach out prior to rebooting the server as your program will not be available while it is rebooting.
If you need to reschedule, please reply to this email and let us know
Thank You
I have verified that I don't have any extra lines in any of the fields in my tables