Sub GetSenderMailAddress()
Dim olItem As Outlook.MailItem
If Application.ActiveExplorer.Selection.Count = 0 Then
MsgBox "No Items selected!", vbCritical, "Error"
Exit Sub
End If
Set olItem = Application.ActiveInspector.currentItem
If olItem.sender.AddressEntryUserType =...
Sub getemail()
Dim m As MailItem
Set m = ActiveExplorer.Selection(1)
f = m.SenderEmailAddress
m.Close olDiscard
Set cb = CreateObject("clipbrd.clipboard")
cb.Clear
cb.SetText f & vbNewLine
End Sub
Hi I need to copy email address to clipboard using macro.The above...
Actually I do nolt want to add the received time to the file name. Can you please help, I have another code as well but it does not work either...if there are no special characters in the subject line then it works fine .
------------------------------------Private Sub...
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim sName As String
Dim sPath As String
Dim enviro As String
On Error Resume Next
enviro = CStr(Environ("username"))
Const olmsg = 3
ReplaceCharsForFileName sName, "_"
sPath = enviro &...
Re: Need help with saving "sent items" email automatically to desktop folder
I am sorry If I post my problem in your thread...actually I had a similar problem the code I put does not work for me and the reason that I can think is because of illegal character...I am not that good in coding...
Need help with saving "sent items" email automatically to desktop folder
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim fName As String
Const olmsg = 3
fName = "C:\Users\Unknown\Desktop\Sent emails\" & Item.Subject & ".msg"
Item.SaveAs fName, olmsg...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.