Thanks for your response. Pls find the code. It was earlier working, for some
reason, it takes my attachment as .lnk and does not sent the attachment due
to restrictions in sending .lnks in setup.
Any help is greatly appreciated. Thanks again.
Private Sub CommandButton1_Click()
Dim bStarted As Boolean
Dim oOutlookApp As Object
Dim oItem As Object
On Error Resume Next
'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
'Outlook wasn't running, start it from code
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
'Create a new mailitem
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.Subject = ActiveDocument.FullName
.Attachments.Add ActiveDocument.FullName, olByValue, 1, "Document as
attachment"
.Display
End With
If bStarted Then
'If we started Outlook from code, then close it
oOutlookApp.Quit
End If
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub