Implement automatic update of outlook Signature Date

Source: Internet
Author: User

Based on the online implementation method, I have summarized the following two points:

Method 1: the simplest method

1. In the signature editing for the date to be inserted, press Ctrl + F9 to display the domain {}

2 input in this domain
{Date @ \ "yyyy-mm-dd"} Save and edit

3
Insert a signature in the email, press Ctrl + A to select all, and press F9 to automatically display the signature.

4. Before sending an email, perform step 4. 

Method 2: Use macro implementation

Use a script instead of using the built-in signature of outlook.

The procedure is as follows:

1. Open outlook and cancel the original signature.

2. Follow the menu (tool-macro-Visual
Basic Editor)

3. In the editor that appears, select thisoutlooksession on the left. The default value on the right is blank.

4. Set the followingCodeCopy to the right: 

 

1 ' ------------------------------------------------------------------
2
3 Dim Myolapp As   New Outlook. Application
4
5 Private Withevents mylinspectors As Outlook. Inspectors
6
7 Private Mymailitem As Outlook. mailitem
8
9 Function Signature () As   String
10
11 Dim Mdate As   Date
12
13 Mdate = Format ( Now , " Yyyy-mm-dd " )
14
15 Signature =   " <Font size = 2> "
16
17 Signature = Signature &   " <P> & nbsp; </P> "
18
19 Signature = Signature &   " <P style = "font-size: 10px"> date of Automatic Signature addition <br/> "   & Mdate &   " <Br/> "
20
21 Signature = Signature &   " Date of automatic signature added </P> "
22
23
24 Signature = Signature &   " </Font> "
25
26 End Function
27
28 Private   Sub Application_startup ()
29
30 ' Getsignature
31
32 Set Myolinspectors = Myolapp. Inspectors
33
34 End sub
35
36 Private   Sub Myolinspectors_newinspector (byval inspector As Inspector)
37
38 Set Mymailitem = Inspector. currentitem
39
40 With Mymailitem
41
42 . Htmlbody = Signature ()
43
44 ' . Display' comment out this line for Outlook 2007
45
46 End   With
47
48 End sub
49
50 ' ----------------------------------------------------------------------------------
51

 

 

The middle part is the signed HTML content, which can be modified as needed.

5. Save and exit. Restart outlook and set tool-macro-Security to low

After a new email is created, the signature content set in the code will be used. 

 

I personally think the first methodThe date is added to the signature using the word domain method. It cannot be automatically updated to the current system date when an email is created. It must be updated by F9. this is inconvenient. I still like the second method. 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.