The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
What I understand is that you need to add a hyperlink to the email body, where the hyperlink points to the SharePoint document. So basically you need to send some body to the email with HTML contents enabled. try the following.
On Error Resume Next
With OutMail
.To = "XYZ"
.CC = "XYZ"
.Subject = " Hello, good morning"
.BodyFormat = olFormatHTML
.HTMLBody = "<HTML><BODY><a href='link to the document here'>Click here to open the document</a> </BODY></HTML>"
.Send
Hope this helps
Refer: https://learn.microsoft.com/en-us/office/vba/api/outlook.mailitem.htmlbody
End With