cyclesimon
Technical User
This is a question further along the lines of the closed thread705-1438489.
I have the following code in an Excel module to open an e-mail with the address, subject and salutation automatically populated.
However, when the e-mail opens, the cursor position is in the upper LH corner of the mesaage body, i.e. to the left of the salutation, even though the %0a inserts a CrLf and puts the AAAA text on a new line.
How would I control the cursor position so that it is in the appropriate place to start adding the e-mail message?
Thanks all from a newbie.
I have the following code in an Excel module to open an e-mail with the address, subject and salutation automatically populated.
However, when the e-mail opens, the cursor position is in the upper LH corner of the mesaage body, i.e. to the left of the salutation, even though the %0a inserts a CrLf and puts the AAAA text on a new line.
How would I control the cursor position so that it is in the appropriate place to start adding the e-mail message?
Thanks all from a newbie.
Code:
Sub callmail()
Dim emaddr As String
Dim subj As String
Dim Name As String
Dim salutation As String
emaddr = Sheets("Sheet1").Range("A2")
subj = Sheets("Sheet1").Range("A3")
Name = Sheets("Sheet1").Range("A4")
salutation = Sheets("Sheet1").Range("A5")
'compose default parts of the message
hlink = "mailto:" & emaddr & "?"
hlink = hlink & "subject=" & subj & Name & " Producer Questionnaire Inquiry " & "&"
hlink = hlink & "body=" & salutation & "%0a" & "AAAA"
'open email
ActiveWorkbook.FollowHyperlink hlink
End Sub