Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2023, 08:48 AM
juacab9 juacab9 is offline create macro to add category to email Windows 11 create macro to add category to email Office 2021
Novice
 
Join Date: Jul 2023
Posts: 12
juacab9 is on a distinguished road
Default


Thank you, this is what I was looking for.
Reply With Quote
  #2  
Old 07-17-2023, 04:48 PM
juacab9 juacab9 is offline create macro to add category to email Windows 11 create macro to add category to email Office 2021
Novice
 
Join Date: Jul 2023
Posts: 12
juacab9 is on a distinguished road
Default Now i run into another issue, it use a different from instead or my email address

Sub ReplyMSG()
'Graham Mayor - Graham Mayor - Home Page - Last updated - 15 Jul 2023
Dim olItem As Outlook.MailItem
Dim olReply As MailItem ' Reply
Dim olInsp As Outlook.Inspector
Dim wdDoc As Object
Dim oRng As Object

On Error Resume Next
Select Case Outlook.Application.ActiveWindow.Class
Case olInspector
Set olItem = ActiveInspector.CurrentItem
Case olExplorer
Set olItem = Application.ActiveExplorer.Selection.Item(1)
End Select

If TypeName(ActiveExplorer.Selection.Item(1)) = "MailItem" Then
Set oMail = ActiveExplorer.Selection.Item(2)

Set olReply = olItem.ReplyAll
With olReply
.BodyFormat = olFormatHTML
Set olInsp = .GetInspector
Set wdDoc = olInsp.WordEditor
Set oRng = wdDoc.Range(0, 0)
oRng.Text = "Am currently working on your quote, I should have it done today or first tomorrow morning. " & _
"Any question, please feel free to email directly."
oRng.Collapse 0
oRng.Text = vbCr & vbCr & "Item 1" _
& vbCr & vbCr & "Item 2" _
& vbCr & vbCr & "Item 3"
olReply.Display
olReply.Send
End With
olItem.Categories = "Juan Cabrera”"
olItem.Close olSave
lbl_Exit:
Set olItem = Nothing
Set olReply = Nothing
Set olInsp = Nothing
Set wdDoc = Nothing
Set oRng = Nothing
Exit Sub
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
create macro to add category to email Create a Userform in Outlook to select a macro for an email template. snickerbart Outlook 4 04-17-2015 12:55 PM
Create QuickStep: Save Contact with Category ilcaa72 Outlook 1 05-20-2014 10:31 AM
Macro to export email to text file on send depending on category Joe Patrick Outlook 0 10-19-2012 06:20 PM
How to create a Main category mirrored in Sub category data entry type of solution? Geza59 Excel 0 10-19-2012 05:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft