Hello, I've got a macro I've made in excel that'll create an email in Outlook. I want to be able to put this in the body:
Racks: "Date" - "Date"
Wire: "Date" - "Date"
Cabinet: "Date" - "Date"
Where the tabs will line up with each other so that each Date starts on the same line. but when I try using vbTab or Chr(9) I only get a group of five spaces, instead of a tab (like pressing the tab button on the keyboard in the body of an email).
here is a simplifed version of my macro
Option Explicit
Private Sub Workbook_Open()
Dim OLapp As Outlook.Application
Dim OLmsg As Outlook.MailItem
RackText = "Racks:" & vbTab & vbTab & Format("Date", "m/d/yy") & " - " & Format("Date", "m/d/yy") & Chr(10)
WireText = "Wire:" & vbTab & vbTab & Format("Date", "m/d/yy") & " - " & Format("Date", "m/d/yy") & Chr(10)
CabText = "Cabinet:" & vbTab & vbTab & Format("Date", "m/d/yy") & " - " & Format("Date", "m/d/yy") & Chr(10)
With OLmsg
.Body = RackText & WireText & CabText
.Display
End With
End Sub
Thank you for any help you are able to give me
Bookmarks