hindersaliva
asked on
Outlook 2010, VBA and Tab question
in Excel VBA I am building up the Body of an email I'm sending in Outlook 2010.
This is my code snippet.
Now the first column 'This is line 1' could be of variable length. So the Email 1 etc may not line up properly vertically.
Similarly for the Notes column.
Is there an easy way of making the columns line up?
Or, how do I know what the width of the tab is? So that I can work out the length of the string and code the adjustment? (ie. whether I need 1 or 2 tabs to fill the gap)
This is my code snippet.
strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbTab & "Email1" & vbTab & "Notes 1" & vbNewLine & _
"This is line 2" & vbTab & "Email2" & vbTab & "Notes 2" & vbNewLine & _
"This is line 3" & vbTab & "Email3" & vbTab & "Notes 3" & vbNewLine & _
"This is line 4" & vbTab & "Email4" & vbTab & "Notes 4"
Now the first column 'This is line 1' could be of variable length. So the Email 1 etc may not line up properly vertically.
Similarly for the Notes column.
Is there an easy way of making the columns line up?
Or, how do I know what the width of the tab is? So that I can work out the length of the string and code the adjustment? (ie. whether I need 1 or 2 tabs to fill the gap)
ASKER
Yes Robr, I though so too. Can you recommend a link to some know-how on it please?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey thanks robr!
That will do me nicely!
That will do me nicely!
almost all current email readers understand html formatted messages.
not modern but it works all the time.... you can set min-width on columns and they should autoexpand to the windows size as necessary