Witzker
Senior Member
- OS Version(s)
- iOS
- Outlook version
- Outlook 2019 32-bit
- Email Account
- Exchange Server 2007
Hi
I have a userform in outlook.
In the code of the form I have the following code:
Sub Datum_Click()
Item.Body = Item.Body & vbCrLf & Date() & " - " & Time() & ": "
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.SendKeys("{TAB 11}")
objWSHShell.SendKeys("^{End}")
objWSHShell.SendKeys("^{backspace}")
End Sub
I have button in the form that starts this code.
Date - time is inserted at the end of the form body.
Date is ok but in time format I do not need seconds.
Can you help me with the correct code to insert date - hh:mm. no seconds.
regards
witzker
I have a userform in outlook.
In the code of the form I have the following code:
Sub Datum_Click()
Item.Body = Item.Body & vbCrLf & Date() & " - " & Time() & ": "
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.SendKeys("{TAB 11}")
objWSHShell.SendKeys("^{End}")
objWSHShell.SendKeys("^{backspace}")
End Sub
I have button in the form that starts this code.
Date - time is inserted at the end of the form body.
Date is ok but in time format I do not need seconds.
Can you help me with the correct code to insert date - hh:mm. no seconds.
regards
witzker