電子メールは不可欠ですが、反復的なタスク(名前で回答をアドレスし、適切な挨拶を追加するなど)は退屈な場合があります。 Outlook 2016、2019、およびOffice 365と互換性のある便利なOutlookマクロで、パーソナライズされた電子メールの挨拶を完全に自動化し、貴重な時間を節約します。 GreetHammer GreetHammerとは? GreetHammer は、メールへの返信のプロセスを簡素化するために設計された Microsoft Outlook 用のシンプルで強力なマクロで、受信者のファーストネームと日の時間に基づいて自動的にパーソナライズされた挨拶を挿入します。 なぜGreetHammerを使うのか? 効率性:手動の努力なしで個人的な挨拶で迅速に応答します。 プロフェッショナリズム:一貫してフォーマットされ、礼儀正しい回答があなたのプロのイメージを向上させます。 使いやすさ: 1 つのクリックで完全にパーソナライズされた電子メールの回答を生成します。 GreetHammer はどのように機能しますか? 以下は、早速の崩壊です。 自動名称検出 GreetHammer は、送信者の詳細から受信者の名前を明確に抽出します。 時間に基づくダイナミックな挨拶 日の時間に基づいて挨拶を自動的に調整する: 「おはようございます」は、午前中からのメールです。 「おはようございます」午後4時から午後4時まで。 「おはようございます」午後4時から。 プロのメールフォーマット Calibri Light フォントを使用してきちんとフォーマットされた挨拶を挿入し、Outlook の標準回答スタイルに一致するように一貫してカラー化します。 すべての機能に対応 GreetHammer は「すべてに返信する」機能を使用して、すべての元のメール受信者にアドレスします。 GreetHammerの実装 ステップ1:Macroの設定 Outlook オープン ALT + F11 を押して VBA エディターを開きます。 Project パネルでは Project1 (VbaProject.OTM) に移動します。 右クリックして「モジュール」を選択し、その後「モジュール」を選択します。 提供された GreetHammer コードを新しいモジュールに挿入します。 ステップ2:セキュリティ設定の調整 Ensure macros are enabled in Outlook: Go to File > Options > Trust Center > Trust Center Settings > Macro Settings Select , or if your policy allows. Notifications for digitally signed macros, all other macros disabled Enable all macros ステップ3:Ribbonボタンを作成する Outlook リボンを右クリックし、リボンをカスタマイズします。 右のパネルでは、新しいグループをクリックして、望むタブで新しいグループを作成します。 グループの名前を変更する(たとえば「GreetHammer」)。 「Choose commands from」から「Macros」を選択します。 マクロを検索して選択します(例えば、「AutoReplyAllWithGreeting」)、そして「Add >>」をクリックします。 マクロボタンを「Rename」ボタンをクリックして、明確性(例えば「GreetHammer」)を変更します。 アイコンを選択し、OKをクリックします。 あなたのマクロは、Outlook リボンから簡単にアクセスできます! STEP 4: Macro を実行する あなたのInboxでメールを選択します。 新しく作成されたリボンボタンをクリックするか、ALT + F8を押すか、AutoReplyAllWithGreetingを選択し、「Run」をクリックします。 あなたの返信メールは自動的に公開され、個人的な挨拶が用意されています。 GreetHammerのカスタマイズ あなたはあなたの好みに基づいてスクリプトをさらに調整することができます: : Modify the or font settings within the macro to match your preferences. (I chose the shade of blue that represents replies) Reply Colors and Fonts replyColor : Adjust the hours in the "Determine the greeting based on the time of day" section for your working hours. Greeting Times GreetHammerの使用の利点 パーソナライズされたコミュニケーション:各受信者に名前で自動的にアドレスします。 時間の節約:過剰な書き込みを排除し、メールワークフローを加速します。 一貫性:すべてのメールでプロの挨拶とフォーマットを確保します。 GreetHammerは、あなたのOutlook通信をより速く、より効率的に、そしてプロのポーリングで処理するのに役立ちます. あなたの電子メールの挨拶を自動化し、このシンプルで強力なツールで貴重な時間を回収! ハッピーメール! Sub AutoReplyAllWithGreeting() Dim originalMail As MailItem Dim replyMail As MailItem Dim recipientName As String Dim currentHour As Integer Dim greeting As String Dim indent As String Dim replyColor As String ' Define the color code for standard Outlook reply blue replyColor = "#1F497D" ' Check if an email is selected If Application.ActiveExplorer.Selection.Count = 0 Then MsgBox "Please select an email to reply to." Exit Sub End If ' Get the selected email Set originalMail = Application.ActiveExplorer.Selection.Item(1) ' Create the "Reply All" Set replyMail = originalMail.ReplyAll ' Simply extract the sender's first name for the greeting recipientName = GetFirstName(originalMail.SenderName) ' Get the current hour currentHour = Hour(Now) ' Determine the greeting based on the time of day Select Case currentHour Case 0 To 11 greeting = "Good morning." Case 12 To 16 greeting = "Good afternoon." Case Else greeting = "Good evening." End Select ' Set indentation, using HTML for proper email formatting indent = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ' 5 non-breaking spaces for indentation in HTML ' Insert the personalized greeting into the reply with color styling and Calibri Light font replyMail.HTMLBody = _ "<p style='color:" & replyColor & "; font-family: Calibri Light; font-size: 11pt;'>" & _ recipientName & "," & _ "</p>" & _ "<p style='color:" & replyColor & "; font-family: Calibri Light; font-size: 11pt;'>" & _ indent & greeting & _ "</p>" & _ replyMail.HTMLBody ' Display the reply email replyMail.Display End Sub ' Function to extract the first name from the full name Function GetFirstName(fullName As String) As String Dim nameParts() As String ' Check if the name is formatted with a comma (e.g., "LastName, FirstName") If InStr(fullName, ",") > 0 Then ' Split by comma and trim any extra spaces nameParts = Split(fullName, ",") GetFirstName = Trim(nameParts(1)) ' Use the second part, which is the first name Else ' Otherwise, split by space and return the first part (assumed to be first name) nameParts = Split(fullName, " ") GetFirstName = nameParts(0) End If End Function