How to deselect part of a selected range in VBA

I am attempting to make a macro that selects a entire range to copy into an email, but I’d like to remove the blank cells from the range selection. With that, I’d also like to add its not just blank cells I am removing, it is also the headers of a specific section of the… Read More How to deselect part of a selected range in VBA

In MS Outlook VBA, how does the structure of a Table object make a row count unreliable?

The Table object does not have a property count. Instead, it has the method GetRowCount. But that comes with the warning that it’s not reliable and may return an approximate count and yield an error. Does anyone here know what’s different about the structure of a Table object that prevents VBA from knowing its count?… Read More In MS Outlook VBA, how does the structure of a Table object make a row count unreliable?

authentication error trying to send Outlook email from Python

I’m testing out a simple script to send an Outlook email from Python 3 (using Spyder). import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart username = ‘my_username@my_company.com’ password = ‘my_password’ mail_from = username mail_to = username mail_subject = "Test Subject" mail_body = "This is a test message" mimemsg = MIMEMultipart() mimemsg[‘From’]=mail_from mimemsg[‘To’]=mail_to mimemsg[‘Subject’]=mail_subject… Read More authentication error trying to send Outlook email from Python

Python create a new mail. Return Line (\n) in body not working

I’m working on a python script which should create a new mail with a specific text body. Fact is that \n does not work as excepted. My code is below : outlook = win32.Dispatch(‘outlook.application’) mail = outlook.CreateItem(0) mail.To = recipient mail.Subject = subject mail.HtmlBody = "This is a return line test \nTest" The body displayed… Read More Python create a new mail. Return Line (\n) in body not working