Μετάβαση στο κύριο περιεχόμενο

Πώς να αλλάξετε αυτόματα την υπογραφή βάσει παραληπτών στο Outlook;

Από προεπιλογή, το Outlook διαθέτει μια ενσωματωμένη λειτουργία για τους χρήστες να αλλάζουν αυτόματα την υπογραφή τους κατά την αποστολή email μέσω διαφορετικών λογαριασμών email. Αλλά πέρα ​​από αυτό, εδώ θα σας δείξω μέθοδο αυτόματης αλλαγής υπογραφής βάσει διαφορετικών παραληπτών στο πεδίο Προς στο Outlook.

Αλλάξτε αυτόματα την υπογραφή με βάση τους παραλήπτες με τον κωδικό VBA


Αλλάξτε αυτόματα την υπογραφή με βάση τους παραλήπτες με τον κωδικό VBA

Ακολουθήστε τα παρακάτω βήματα για να εφαρμόσετε διαφορετικές υπογραφές στους αντίστοιχους παραλήπτες κατά την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου στο Outlook.

1. Πρώτον, πρέπει να απενεργοποιήσετε τη δυνατότητα αυτόματης επισύναψης υπογραφής στο Outlook. Παρακαλώ πατήστε Αρχεία > Επιλογές για να ανοίξετε το Επιλογές του Outlook παράθυρο.

2. Στο Επιλογές του Outlook παράθυρο, επιλέξτε Ταχυδρομείο στο αριστερό παράθυρο και, στη συνέχεια, κάντε κλικ στο Υπογραφές στο κουμπί Σύνταξη μηνυμάτων Ενότητα. Δείτε το στιγμιότυπο οθόνης:

3. Στο Υπογραφές και χαρτικά πλαίσιο διαλόγου, μεταβείτε στο Επιλέξτε την προεπιλεγμένη υπογραφή ενότητα κάτω από το Υπογραφή ηλεκτρονικού ταχυδρομείου καρτέλα, επιλέξτε έναν λογαριασμό email στο Λογαριασμός ηλεκτρονικού ταχυδρομείου αναπτυσσόμενη λίστα και, στη συνέχεια, επιλέξτε (Κανένας) από το Νέα μηνύματα και Απαντήσεις / προωθήσεις αναπτυσσόμενες λίστες. Επαναλάβετε αυτά τα βήματα έως ότου οριστούν όλοι οι λογαριασμοί email (Κανένας). Στη συνέχεια, κάντε κλικ στο OK κουμπί.

Note: Μπορείτε επίσης να δημιουργήσετε τις απαραίτητες υπογραφές σας σε αυτό Υπογραφές και χαρτικά κουτί διαλόγου.

4. Κάντε κλικ στο κουμπί OK κουμπί όταν επιστρέφει το Επιλογές του Outlook παράθυρο.

5. Πάτα το άλλος + F11 για να ανοίξετε το Microsoft Visual Basic για εφαρμογές παράθυρο.

6. Στο Microsoft Visual Basic για εφαρμογές παράθυρο, κάντε διπλό κλικ Αυτό το OutlookSession στο αριστερό παράθυρο για να ανοίξετε το παράθυρο Κωδικός και το αντίγραφο κάτω από τον κώδικα VBA στο παράθυρο. Δείτε το στιγμιότυπο οθόνης:

Κωδικός VBA: Αλλάξτε αυτόματα την υπογραφή βάσει παραληπτών στο Outlook

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by ExtendOffice 2022/08/01
Dim xMailItem As MailItem
Dim xRecipients As Recipients
Dim xRecipient As Recipient
Dim xRcpAddress As String
Dim xSignatureFile, xSignaturePath As String
Dim xFSO As Scripting.FileSystemObject
Dim xDoc As Document
Dim xFindStr As String
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
If Item.Class <> olMail Then Exit Sub
Set xMailItem = Item
Set xRecipients = xMailItem.Recipients
xSignaturePath = CreateObject("WScript.Shell").SpecialFolders(5) + "\Microsoft\Signatures\"
For Each xRecipient In xRecipients
    If xRecipient.AddressEntry.AddressEntryUserType = olExchangeUserAddressEntry Then
        xRcpAddress = xRecipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress
    Else
        xRcpAddress = xRecipient.AddressEntry.Address
    End If
    Select Case xRcpAddress
        Case "Email Address 1"
            xSignatureFile = xSignaturePath & "aaa.htm"
            Exit For
        Case "Email Address 2", "Email Address 3"
            xSignatureFile = xSignaturePath & "bbb.htm"
            Exit For
        Case "Email Address 4"
            xSignatureFile = xSignaturePath & "ccc.htm"
            Exit For
    End Select
Next
VBA.DoEvents
Set xDoc = xMailItem.GetInspector.WordEditor
xFindStr = "From: " & xMailItem.Recipients.Item(1).Name & " <" & xRcpAddress & ">"
If VBA.InStr(1, xMailItem.Body, xFindStr) <> 0 Then
    xDoc.Application.Selection.HomeKey Unit:=wdStory, Extend:=wdMove
    With xDoc.Application.Selection.Find
        .ClearFormatting
        .Text = xFindStr
        .Execute Forward:=True
    End With
    With xDoc.Application.Selection
        .MoveLeft wdCharacter, 2
        .InsertParagraphAfter
        .MoveDown Unit:=wdLine, Count:=1
    End With
Else
    With xDoc.Application.Selection
        .EndKey Unit:=wdStory, Extend:=wdMove
        .InsertParagraphAfter
        .MoveDown Unit:=wdLine, Count:=1
    End With
End If
xDoc.Application.Selection.InsertFile FileName:=xSignatureFile, Link:=False, Attachment:=False
End Sub

Notes:

  • 1). Στον κωδικό VBA, αντικαταστήστε το "Διεύθυνση email 1/2/3/4"Με τις συγκεκριμένες διευθύνσεις email των παραληπτών.
  • 2). "αaa.htm""bbb.htm"Και"ccc.htm" είναι οι καθορισμένες υπογραφές που θα στείλετε στους αντίστοιχους παραλήπτες.
  • 3). Σε αυτήν την περίπτωση, υπογραφή "ααα"Θα σταλεί στο"Διεύθυνση email 1", υπογραφή "bbb"Θα σταλεί στο"Διεύθυνση email 2"Και"Διεύθυνση email 3", και "Διεύθυνση email 4"Θα λάβει το email ενσωματωμένο με υπογραφή"ccc". Αλλάξτε τα ανάλογα με τις ανάγκες σας.
  • 4). Εάν υπάρχουν πολλοί παραλήπτες σε ένα email, ο κωδικός λαμβάνει υπόψη μόνο τον πρώτο παραλήπτη. Σε αυτήν την περίπτωση, άλλοι παραλήπτες θα λάβουν τα email με την ίδια υπογραφή με τον πρώτο παραλήπτη.

7. Στη συνέχεια κάντε κλικ στο κουμπί Εργαλεία > αναφορές για να μεταβείτε στο Αναφορές-Έργο κουτί διαλόγου. Στο παράθυρο διαλόγου, ελέγξτε και τα δύο Βιβλιοθήκη αντικειμένων του Microsoft Word και την Χρόνος εκτέλεσης δέσμης ενεργειών Microsoft επιλογές και, στη συνέχεια, κάντε κλικ στο OK κουμπί, δείτε το στιγμιότυπο οθόνης:

8. Πάτα το άλλος + Q πλήκτρα για να κλείσετε το Microsoft Visual Basic για εφαρμογές παράθυρο.

Από τώρα και στο εξής, αφού συνθέσετε ένα email και πατήσετε το κουμπί Αποστολή, η αντίστοιχη υπογραφή θα εισαχθεί αυτόματα στο τέλος του σώματος email με βάση τη διεύθυνση email του παραλήπτη στο πεδίο Προς.


Εισαγάγετε αυτόματα την τρέχουσα ημερομηνία ως υπογραφή κατά την αποστολή email στο Outlook:

Εάν θέλετε να εισαγάγετε τη χρονική σήμανση ως υπογραφή στο σώμα του email κατά τη δημιουργία / απάντηση / προώθηση νέου email στο Outlook, μπορείτε να ενεργοποιήσετε το Προσθέστε υπογραφή ημερομηνίας κατά τη δημιουργία νέου, απάντησης και προώθησης email επιλογή του Kutools για το Outlook για να το επιτύχετε. Δείτε το στιγμιότυπο οθόνης:
Κατεβάστε το και δοκιμάστε το τώρα (δωρεάν διαδρομή 60 ημερών)


Τα καλύτερα εργαλεία παραγωγικότητας γραφείου

Kutools για το Outlook - Πάνω από 100 ισχυρές δυνατότητες για υπερφόρτιση του Outlook σας

🤖 Βοηθός αλληλογραφίας AI: Άμεσα επαγγελματικά email με μαγεία AI -- με ένα κλικ για ιδιοφυείς απαντήσεις, τέλειος τόνος, πολυγλωσσική γνώση. Μεταμορφώστε τα email χωρίς κόπο! ...

📧 Αυτοματοποίηση ηλεκτρονικού ταχυδρομείου: Εκτός γραφείου (Διαθέσιμο για POP και IMAP)  /  Προγραμματισμός αποστολής email  /  Αυτόματο CC/BCC βάσει κανόνων κατά την αποστολή email  /  Αυτόματη προώθηση (Σύνθετοι κανόνες)   /  Αυτόματη προσθήκη χαιρετισμού   /  Διαχωρίστε αυτόματα τα μηνύματα ηλεκτρονικού ταχυδρομείου πολλών παραληπτών σε μεμονωμένα μηνύματα ...

📨 Διαχείριση e-mail: Εύκολη ανάκληση email  /  Αποκλεισμός απάτης email από υποκείμενα και άλλους  /  Διαγραφή διπλότυπων μηνυμάτων ηλεκτρονικού ταχυδρομείου  /  Προχωρημένη Αναζήτηση  /  Ενοποίηση φακέλων ...

📁 Συνημμένα ProΜαζική αποθήκευση  /  Αποσύνδεση παρτίδας  /  Συμπίεση παρτίδας  /  Αυτόματη αποθήκευση   /  Αυτόματη απόσπαση  /  Αυτόματη συμπίεση ...

🌟 Διασύνδεση Magic: 😊Περισσότερα όμορφα και δροσερά emojis   /  Ενισχύστε την παραγωγικότητά σας στο Outlook με προβολές με καρτέλες  /  Ελαχιστοποιήστε το Outlook αντί να κλείσετε ...

???? Με ένα κλικ Wonders: Απάντηση σε όλους με εισερχόμενα συνημμένα  /   Email κατά του phishing  /  🕘Εμφάνιση ζώνης ώρας αποστολέα ...

👩🏼‍🤝‍👩🏻 Επαφές & Ημερολόγιο: Μαζική προσθήκη επαφών από επιλεγμένα μηνύματα ηλεκτρονικού ταχυδρομείου  /  Διαχωρίστε μια ομάδα επαφής σε μεμονωμένες ομάδες  /  Κατάργηση υπενθυμίσεων γενεθλίων ...

Διανεμήθηκαν παραπάνω από 100 Χαρακτηριστικά Περιμένετε την εξερεύνηση σας! Κάντε κλικ εδώ για να ανακαλύψετε περισσότερα.

 

 

Comments (43)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi Crystal,

first of all thanks a lot for your effort in devolping a such useful and smart code!

I'm facing a very similar problem to Josh's one #40488 (also if not identical). I merged two versions of your code in way to have the internal and external different signature feature depending on the recipient address (Pauli #33113) and to solve the problem about the signature being posted at the last selection point in the message (Eric #38525).

When creating a new email everything works flawlessy but unfortunately when replying (both if only to internals, only to externals or both) the signature is being posted at the end of the entire conversation thread instead of at the end of my last reply.

I performed different tests and tryed some mods but i didn't came up. May you please help me in solving this problem? I'm looking to assemble a code with internal and external different signature depending on recipient feature posting the signature always at the end of my last message (in both new message and reply message).

I'm at your complete disposal for helping debugging and testing. I think this should be a definitive full feature version for lot of users.

Thanks a lot in advance anyway and have a nice day.
This comment was minimized by the moderator on the site
Hi Lorenzo,

Can you tell me which code are you using? Is it the one I replied to Pauli Pauli #33114?
This comment was minimized by the moderator on the site
Hi Crystal,
first thanks a lot for your efforts in coding these Outlook signature smart solutions!

I'm facing a similar problem to Josh #40488: I merged your code from your answer to Pauli #33114 (std version + internal and external signature recognition) with the update you gave as answer to the problem faced by Lelian #39096 (signature posted at the end of all the conversation history when replying).

Unfortunately the update given to Lelian #39096 seems not to work in my case very likely such as (but not identical) posted by Josh. When i create a new message everything it's working flawlessy but unfortunately when replying with both the internal or external version of the signature, that is posted at the end of all the conversation thread instead of at the end of only my last message.

I tried different tests and mods but I'm still not managing in understanding why. May you please help me/us to find a solution to this problem? I'm at your disposal for debugging and testing purposes. I think that this one should be a definitive version for lot of users.

Thanks in advance anyway and have a nice day.
This comment was minimized by the moderator on the site
Hi! I have implemented the code at for the most part it works as intended. However, every now and then it inserts the signature in the middle of a message. it first happened when I attached in table in the body. the signature was inserted into the table. Also, it has happened that it cuts off the some of the text such that two-three lines of text are in the end of the mail (after the signature). This doesn't happen all the time, but I hope you can help to solve it so that it becomes more reliable.
This comment was minimized by the moderator on the site
Hi Mikkel Lundsgaard,
The code works well in my case. Which Outlook version are you using?
This comment was minimized by the moderator on the site
I suppose it's the latest version.
This comment was minimized by the moderator on the site
Hi Crystal,

Hope you are well.

Can you advise if it is possible to add a different signature based upon the subject field having specific words.

Many thanks
Matt
This comment was minimized by the moderator on the site
Hi Matt Read,
Thank you for your comment. I am not able to solve this problem yet.
This comment was minimized by the moderator on the site
Ok thank you for taking the time
This comment was minimized by the moderator on the site
Hi Crystal,

Same as others in this thread, I'd like my signature to default to an external signature if there's any non-internal email addresses in the to or cc line and switch to an internal signature when it's only internal email addresses. To do so, I've combined your most updated code (response to Lelian) with Random_Guest's response to Daniela (defaulting to the external signature). The result is that when I'm only responding to internal email addresses, the signature works perfectly; however, when my external signature is pulled in, it drops the signature into the bottom of the email chain, not to the end of the email I'm sending. Can you please advise how to correct? I've included the code below:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by ExtendOffice 2022/08/01
Dim xMailItem As MailItem
Dim xRecipients As Recipients
Dim xRecipient As Recipient
Dim xRcpAddress As String
Dim xSignatureFile, xSignaturePath As String
Dim xFSO As Scripting.FileSystemObject
Dim xDoc As Document
Dim xFindStr As String
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
If Item.Class <> olMail Then Exit Sub
Set xMailItem = Item
Set xRecipients = xMailItem.Recipients
xSignaturePath = CreateObject("WScript.Shell").SpecialFolders(5) + "\Microsoft\Signatures\"
For Each xRecipient In xRecipients
If xRecipient.AddressEntry.AddressEntryUserType = olExchangeUserAddressEntry Then
xRcpAddress = xRecipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress
Else
xRcpAddress = xRecipient.AddressEntry.Address
End If
If VBA.InStr(VBA.LCase(xRcpAddress), "@mycompany'sname") = 0 Then 'Enter the string in the double quotation marks. If the recipient email address contains this string, the below signature "internal.htm" will be assigned to the email. Otherwise, assign the signature "external.htm".
xSignatureFile = xSignaturePath & "External.htm"
Exit For
Else
xSignatureFile = xSignaturePath & "Internal.htm"
End If
Next
VBA.DoEvents
Set xDoc = xMailItem.GetInspector.WordEditor
xFindStr = "From: " & xMailItem.Recipients.Item(1).Name & " <" & xRcpAddress & ">"
If VBA.InStr(1, xMailItem.Body, xFindStr) <> 0 Then
xDoc.Application.Selection.HomeKey Unit:=wdStory, Extend:=wdMove
With xDoc.Application.Selection.Find
.ClearFormatting
.Text = xFindStr
.Execute Forward:=True
End With
With xDoc.Application.Selection
.MoveLeft wdCharacter, 2
.InsertParagraphAfter
.MoveDown Unit:=wdLine, Count:=1
End With
Else
With xDoc.Application.Selection
.EndKey Unit:=wdStory, Extend:=wdMove
.InsertParagraphAfter
.MoveDown Unit:=wdLine, Count:=1
End With
End If
xDoc.Application.Selection.InsertFile FileName:=xSignatureFile, Link:=False, Attachment:=False
End Sub
This comment was minimized by the moderator on the site
Hi Josh,
This problem is a bit complicated. I need time to find a solution. Just not able to handle it right now. Sorry for that.
This comment was minimized by the moderator on the site
No problem -- thanks for giving it a look!
This comment was minimized by the moderator on the site
Bonjour,

Quand je réponds à des mails, la signature automatique s'insère tout en bas, mais j'aimerais qu'elle s'insère en bas de mon message à moi.

Avez vous une solution ?

Lélian
This comment was minimized by the moderator on the site
Hi LÉLIAN ALEMPS.
The VBA code has been updated. Thank you for your feedback. Please give it a try.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by ExtendOffice 2022/08/01
Dim xMailItem As MailItem
Dim xRecipients As Recipients
Dim xRecipient As Recipient
Dim xRcpAddress As String
Dim xSignatureFile, xSignaturePath As String
Dim xFSO As Scripting.FileSystemObject
Dim xDoc As Document
Dim xFindStr As String
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
If Item.Class <> olMail Then Exit Sub
Set xMailItem = Item
Set xRecipients = xMailItem.Recipients
xSignaturePath = CreateObject("WScript.Shell").SpecialFolders(5) + "\Microsoft\Signatures\"
For Each xRecipient In xRecipients
    If xRecipient.AddressEntry.AddressEntryUserType = olExchangeUserAddressEntry Then
        xRcpAddress = xRecipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress
    Else
        xRcpAddress = xRecipient.AddressEntry.Address
    End If
    Select Case xRcpAddress
        Case "Email Address 1"
            xSignatureFile = xSignaturePath & "aaa.htm"
            Exit For
        Case "Email Address 2", "Email Address 3"
            xSignatureFile = xSignaturePath & "bbb.htm"
            Exit For
        Case "Email Address 4"
            xSignatureFile = xSignaturePath & "ccc.htm"
            Exit For
    End Select
Next
VBA.DoEvents
Set xDoc = xMailItem.GetInspector.WordEditor
xFindStr = "From: " & xMailItem.Recipients.Item(1).Name & " <" & xRcpAddress & ">"
If VBA.InStr(1, xMailItem.Body, xFindStr) <> 0 Then
    xDoc.Application.Selection.HomeKey Unit:=wdStory, Extend:=wdMove
    With xDoc.Application.Selection.Find
        .ClearFormatting
        .Text = xFindStr
        .Execute Forward:=True
    End With
    With xDoc.Application.Selection
        .MoveLeft wdCharacter, 2
        .InsertParagraphAfter
        .MoveDown Unit:=wdLine, Count:=1
    End With
Else
    With xDoc.Application.Selection
        .EndKey Unit:=wdStory, Extend:=wdMove
        .InsertParagraphAfter
        .MoveDown Unit:=wdLine, Count:=1
    End With
End If
xDoc.Application.Selection.InsertFile FileName:=xSignatureFile, Link:=False, Attachment:=False
End Sub
This comment was minimized by the moderator on the site
Hi Crystal - I also have the same issue as Tim (#33997) and Greg (#34358) referenced above, but do not see a solution. The signature appears in my email in the last place I click before I hit 'send, thus often appearing in the middle of the email. Any help/solutions?

Thank you!

Eric
This comment was minimized by the moderator on the site
Hi Eric Anderson,
Thank you for your feedback. The code has now been updated and the issue has been solved. Please give it a try.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by ExtendOffice 2022/6/24
Dim xMailItem As MailItem
Dim xRecipients As Recipients
Dim xRecipient As Recipient
Dim xRcpAddress As String
Dim xSignatureFile, xSignaturePath As String
Dim xFSO As Scripting.FileSystemObject
Dim xDoc As Document
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
If Item.Class <> olMail Then Exit Sub
Set xMailItem = Item
Set xRecipients = xMailItem.Recipients
xSignaturePath = CreateObject("WScript.Shell").SpecialFolders(5) + "\Microsoft\Signatures\"
For Each xRecipient In xRecipients
    If xRecipient.AddressEntry.AddressEntryUserType = olExchangeUserAddressEntry Then
        xRcpAddress = xRecipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress
    Else
        xRcpAddress = xRecipient.AddressEntry.Address
    End If
    Debug.Print xRcpAddress
    Select Case xRcpAddress
        Case ""
            xSignatureFile = xSignaturePath & "aaa.htm"
            Exit For
        Case "", ""
            xSignatureFile = xSignaturePath & "bbb.htm"
            Exit For
        Case ""
            xSignatureFile = xSignaturePath & "ccc.htm"
            Exit For
    End Select
Next
VBA.DoEvents
Set xDoc = xMailItem.GetInspector.WordEditor
xDoc.Application.Selection.EndKey Unit:=wdStory, Extend:=wdMove
xDoc.Application.Selection.InsertParagraphAfter
xDoc.Application.Selection.MoveDown Unit:=wdLine, Count:=1
xDoc.Application.Selection.InsertFile FileName:=xSignatureFile, Link:=False, Attachment:=False
End Sub
This comment was minimized by the moderator on the site
I have multiple email accounts setup on Outlook and have your script setup to email different signatures to the internal and external emails.

How can I modify the script so that it only sends these signatures if I'm sending from ?

In other words, I don't want to send these signature when I'm sending from an email address other than .

Thanks,
This comment was minimized by the moderator on the site
Hi Jeff Weaver,
The following VBA code has been modified to insert these signatures when sending emails only from a specified email account. Please give it a try. hope I can help.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Updated by ExtendOffice 2022/06/10
Dim xMailItem As MailItem
Dim xRecipients As Recipients
Dim xRecipient As Recipient
Dim xRcpAddress As String
Dim xSignatureFile, xSignaturePath As String
Dim xFSO As Scripting.FileSystemObject
Dim xDoc As Document
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
If Item.Class <> olMail Then Exit Sub
Set xMailItem = Item
If xMailItem.SendUsingAccount.SmtpAddress <> "" Then Exit Sub 'The email account you send emails from
Set xRecipients = xMailItem.Recipients
xSignaturePath = CreateObject("WScript.Shell").SpecialFolders(5) + "\Microsoft\Signatures\"
For Each xRecipient In xRecipients
    If xRecipient.AddressEntry.AddressEntryUserType = olExchangeUserAddressEntry Then
        xRcpAddress = xRecipient.AddressEntry.GetExchangeUser.PrimarySmtpAddress
    Else
        xRcpAddress = xRecipient.AddressEntry.Address
    End If
    Select Case xRcpAddress
        Case "Email Address 1"
            xSignatureFile = xSignaturePath & "aaa.htm"
            Exit For
        Case "Email Address 2", "Email Address 3"
            xSignatureFile = xSignaturePath & "bbb.htm"
            Exit For
        Case "Email Address 4"
            xSignatureFile = xSignaturePath & "ccc.htm"
            Exit For
    End Select
Next
VBA.DoEvents
Set xDoc = xMailItem.GetInspector.WordEditor
xDoc.Application.Selection.EndKey
xDoc.Application.Selection.InsertParagraphAfter
xDoc.Application.Selection.MoveDown Unit:=wdLine, Count:=1
xDoc.Application.Selection.InsertFile FileName:=xSignatureFile, Link:=False, Attachment:=False
End Sub
This comment was minimized by the moderator on the site
Hello Crystal,
I have a question about the source code below.
I would like to send an internal signature only to certain email recipients (30), as soon as another email address is added, the external signature should be used.
Can you help me with my request?
Many thanks in advance.
This comment was minimized by the moderator on the site
This code worked for me until I restarted my PC.When I open alt+F11 again, all the code is still in the same place, but when I send an e-mail, it just sends it without a signature and without issuing any sort of warning message.
This comment was minimized by the moderator on the site
Hi Ivan,The problem is caused by Excel disabling the Macro option. You need to get into the Outlook Options window by clicking File > Options. In the Outlook Options window, click Trust Center in the left pane, and then click Trust Center Settings button. In the Trust Center window, click Macro Settings in the left pane, and then select the Enable all macros radio button and check the Apply macro security settings to installed add-ins box. See the attached screenshot below.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations