Skip i'r prif gynnwys

Sut i fewnosod codwr dyddiad mewn e-byst yn Outlook?

Awdur: Siluvia Wedi'i Addasu Diwethaf: 2024-05-09

Tybiwch fod angen i chi anfon amserlen waith at eich cydweithwyr, gan aseinio gwahanol dasgau i wahanol bobl ar wahanol ddyddiadau. Fodd bynnag, rydych chi'n poeni am wneud camgymeriadau wrth nodi'r dyddiad â llaw, felly mae angen dewiswr dyddiad arnoch chi yn lle hynny. Mae'r tiwtorial hwn yn darparu dull i'ch helpu chi i fewnosod codwr dyddiad mewn e-byst yn Outlook.


Mewnosod codwr dyddiad mewn E-byst yn Outlook gyda chod VBA

Gallwch chi redeg y cod VBA canlynol i fewnosod codwr dyddiad mewn e-byst Outlook. Dilynwch y cyfarwyddiadau isod.

  1. Launch your Outlook, press the Alt + F11 allweddi i agor y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.
  2. In the left pane, double click Project1 > Gwrthrychau Microsoft Outlook > Sesiwn Golwg Hon, ac yna copïwch y cod VBA canlynol i'r ThisOutlookSession (Cod) ffenestr.
    Cod VBA: Mewnosod codwr dyddiad mewn e-byst Outlook
    Sub DatePicker()
    'Updated by Extendoffice 20220615
      Dim xDoc As Document
      On Error Resume Next
      Set xDoc = Application.ActiveInspector.WordEditor
      With xDoc.Application.Selection
        .Range.ContentControls.Add (wdContentControlDate)
        .ParentContentControl.DateDisplayFormat = "MMMM d, yyyy"
        .InsertAfter Format(Now(), "MMMM d, yyyy")
        .MoveRight wdCharacter, 1
      End With
    End Sub
    Nodyn: In the code, you can change "MMMM d, yyyy" to the date format you need.
  3. Arhoswch yn y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr, cliciwch offer > Cyfeiriadau.
  4. Yn y Cyfeiriadau – Prosiect1 blwch deialog, gwiriwch y Llyfrgell Gwrthrychau Microsoft Word 16.0 blwch gwirio, a chlicio OK i achub y newidiadau.
  5. Gwasgwch y Alt + Q allweddi i gau'r Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.
  6. Yn y bost gweld, cliciwch y Ebost Newydd botwm o dan y Hafan tab i greu e-bost newydd.
  7. Yn y Neges ffenestr, cliciwch ar Addasu Bar Offer Mynediad Cyflym botwm , Ac yna dewiswch Mwy o Orchmynion o'r gwymplen. Gweler y screenshot:
  8. Yn y Dewisiadau Outlook ffenestr, mae angen i chi ffurfweddu fel a ganlyn.
    1. Dewiswch Macros yn y Dewiswch orchymyn o rhestr ostwng;
    2. Select the script you created above in the left commands box;
    3. Cliciwch ar y Ychwanegu botwm.
    4. Keep the script selected in the right box, and then click the Addasu botwm. Yn y Addasu Botwm blwch deialog, aseinio botwm newydd i'r sgript a chliciwch OK.
    5. Cliciwch OK yn y Dewisiadau Outlook ffenestr i arbed y newidiadau.
  9. Mae'r sgript VBA bellach yn cael ei ychwanegu at y Bar Offer Mynediad Cyflym ac yn cael ei arddangos fel yr eicon a nodwyd gennych.
  10. O hyn ymlaen, wrth gyfansoddi e-bost, gallwch glicio ar yr eicon codwr dyddiad ar y Bar Offer Mynediad Cyflym i fewnosod codwr dyddiad yn y corff e-bost, ac yna dewis dyddiad sydd ei angen arnoch chi. Gweler y demo canlynol.
Nodiadau:
  • You can insert multiple date pickers into the body of an email.
  • You can change the date you have selected: click on the date field to display the Date control, then select a new date as needed.
  • This date picker can also be inserted into the body of an appointment or a task. If you need to, create a new appointment or task and repeat the step 7-8 above to achieve it.
  • If you restart Outlook and find that the script does not run. That's because the macro was disabled. You need to follow the steps below to re-enable the macro:
    1. Cliciwch ar Ffeil > Dewisiadau i fynd i mewn i'r Dewisiadau Outlook ffenestr.
    2. Cliciwch ar Canolfan yr Ymddiriedolaeth > Gosodiadau Canolfan Ymddiriedolaeth.
    3. Yn y Canolfan yr Ymddiriedolaeth ffenestr, cliciwch ar y Gosodiadau Macro tab, dewiswch y Galluogi pob macros opsiwn, a chlicio OK > OK i achub y gosodiadau newydd.
    4. Restart Outlook once more.

Offer Cynhyrchiant Swyddfa Gorau

Kutools ar gyfer Rhagolwg - Dros 100 o Nodweddion Pwerus i Werthu Eich Outlook

🤖 Cynorthwy-ydd Post AI: E-byst pro ar unwaith gyda hud AI - un clic i atebion athrylith, tôn berffaith, meistrolaeth amlieithog. Trawsnewid e-bostio yn ddiymdrech! ...

📧 E-bostio Automation: Allan o'r Swyddfa (Ar gael ar gyfer POP ac IMAP)  /  Amserlen Anfon E-byst  /  Auto CC/BCC gan Reolau Wrth Anfon E-bost  /  Awto Ymlaen (Rheolau Uwch)   /  Auto Ychwanegu Cyfarchiad   /  Rhannwch E-byst Aml-Dderbynnydd yn Negeseuon Unigol yn Awtomatig ...

📨 Rheoli E-bost: Dwyn i gof E-byst yn Hawdd  /  Rhwystro E-byst Sgam gan Bynciau ac Eraill  /  Dileu E-byst Dyblyg  /  Chwilio Manwl  /  Cydgrynhoi Ffolderi ...

📁 Ymlyniadau ProArbed Swp  /  Swp Datgysylltu  /  Cywasgu Swp  /  Auto Achub   /  Datgysylltiad Auto  /  Cywasgiad Auto ...

🌟 Rhyngwyneb Hud: 😊Mwy o Emojis Pretty a Cŵl   /  Rhowch hwb i'ch Cynhyrchiant Outlook gyda Golygfeydd Tabbed  /  Lleihau Outlook Yn lle Cau ...

???? Rhyfeddodau un clic: Ateb Pawb ag Ymlyniadau Dod i Mewn  /   E-byst Gwrth-Gwe-rwydo  /  🕘Dangos Parth Amser yr Anfonwr ...

👩🏼‍🤝‍👩🏻 Cysylltiadau a Chalendr: Swp Ychwanegu Cysylltiadau O E-byst Dethol  /  Rhannwch Grŵp Cyswllt i Grwpiau Unigol  /  Dileu Atgoffa Pen-blwydd ...

Dros Nodweddion 100 Aros Eich Archwiliad! Cliciwch Yma i Ddarganfod Mwy.

 

 

Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
WHEN I CLOSE THE OUTLOOK AND RESTAR THIS IS NOT WORKING, WHY? CAN YOU HELP
This comment was minimized by the moderator on the site
Hi,

I'm very sorry, this issue occurred because macros were disabled after restarting Outlook. Please follow these steps to re-enable macros:
Click on File > Options to enter the Outlook Options window, click on Trust Center > Trust Center Settings, in the Trust Center window, click on the Macro Settings tab, select the Enable all macros option, and click OK to save the new settings. Please restart Outlook once more, and the issue should be resolved.
This comment was minimized by the moderator on the site
Hello. Very clear instructions, thank you.
When I attempt to use the macro, I get this error:
"Compile error: User defined type not defined."
Sub DatePicker() and xDoc As Document are highlighted.
Any ideas on how to fix it please?
This comment was minimized by the moderator on the site
Hi Dave,

To solve this problem, please follow the instruction of step 3 and 4 to enable the Microsoft Word 16.0 Object Library option in the Microsoft Visual Basic for Applications window.
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/outlook-word-referece-vba.png?1711618070
This comment was minimized by the moderator on the site
This was exactly what I was looking for. Thank you!!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations