Hello,
My first post but I've been reading this forum and slipstick for a few weeks now. Through that and other sites I've come up with this VBA which allows me to copy an email directly from the preview window with headers.
My problem is that when I paste the email the first 12 lines are not needed which include a Subject line, an Include line, then a few blank lines and then 7 lines for my signature. I'm manually removing these lines but am trying to customize the VBA above to do that for me. Or come up with another approach. I seem to be struggling either way. Can anyone put me in the right direction?
My first post but I've been reading this forum and slipstick for a few weeks now. Through that and other sites I've come up with this VBA which allows me to copy an email directly from the preview window with headers.
Code:
Sub copyall()
Dim m As MailItem
Dim cb As Object
Set m = ActiveExplorer().Selection.Item(1)
tmp = "c:\temp\mytest.txt" 'any filename as long as it does not overwrite some wanted file
Set m = m.Forward
m.SaveAs tmp, 0
m.Close olDiscard
Open tmp For Input As 1
mymsg = Input(LOF(1), #1)
Close 1
Kill tmp
Set cb = CreateObject("clipbrd.clipboard")
cb.Clear
cb.SetText CStr(mymsg)
End Sub
My problem is that when I paste the email the first 12 lines are not needed which include a Subject line, an Include line, then a few blank lines and then 7 lines for my signature. I'm manually removing these lines but am trying to customize the VBA above to do that for me. Or come up with another approach. I seem to be struggling either way. Can anyone put me in the right direction?