I need to automate a process to recieve certain emails based on the sender and print to a thermal POS printer. However, the print driver is doing a lousy job with the margins of the outlook emails, so I would like to just print the body directly as a string without the header information( To:, From:, Subject: etc.)My email is hosted by gmail, so I am also open to a process that will skip outlook entirely, but I imagine that to be a lot more complicated.
Below is the simple script I have so far, but does not work because the "PrintOut" function cannot be used with a string. Please forgive me if this is extremely simple, I do not have a great knowledge of programming.
Sub PrintBody(Msg As Outlook.MailItem)
Dim Subj As String, Body As String
Subj = Msg.Subject
Body = Msg.HTMLBody