THX great
Can you pls help me on to
oRng.Text = Format(Date, "mm/dd/yyyy") & " Call:" & vbCrLf
' could you pls be so kind and ad also actual time HH.MM
' Please place the cursor at the end of what has been inserted to be able to start writing
'Do not Close for further inserting text there
Public Sub AddDateEnd()
' Graham Mayor - https://www.gmayor.com - Last updated - 09 Nov 2020
Dim olItem As ContactItem
Dim olInsp As Inspector
Dim wdDoc As ObjectDim oRng As Object
On Error Resume Next
Select Case Outlook.Application.ActiveWindow.Class
Case olInspector
Set olItem = ActiveInspector.CurrentItem
Case olExplorer
Set olItem = Application.ActiveExplorer.Selection.Item(1)
End Select
With olItem
.Display
Set olInsp = .GetInspector
Set wdDoc = olInsp.WordEditor
Set oRng = wdDoc.Range
oRng.Collapse 0 'set to1 to put the date at the start of the body
oRng.Text = Format(Date, "mm/dd/yyyy") & " Call:" & vbCrLf 'Pls ad also actual time HH.MM
oRng.Font.Color = RGB(0, 128, 0) 'green
.Save
' place the cursor at the end of what has been inserted to be able to start writing
'.Close 0 'Do not Close for further inserting text there
End With
lbl_Exit:
Set olItem = Nothing
Set olInsp = Nothing
Set wdDoc = Nothing
Set oRng = Nothing
Exit Sub
End Sub
Hope for further help
THX