Deutsch
|
OLKeeper |
| OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or e-mails. |
Word supports to send the active document as an attachment to Outlook, which you can send then with an email. However, the email window opens in a modal state, which means other Outlook windows are blocked as long as the email is being displayed. During that time you cannot look at your calendar, for instance, or copy some data from another email. There's more Outlook features that don't work, for instance, automatically adding your signature to the email created by Word.
This VBA macro for Word bypasses the limitations. Open the VBA editor in Word, add a standard module to the "Normal" project, and paste the code there. You can start the macro from the document by pressing alt+f8.
The macro expects Outlook to be running already. If the Word document is saved yet, the email with the attached document will be created immediately else you'll be asked to save the document first.
Public Sub AttachToEmail()
Dim Outlook As Object
Dim Mail As Object
Dim Att As Object
Dim Fullname As String
Dim Dlg As Office.FileDialog
If ActiveDocument.Saved Then
Fullname = ActiveDocument.Fullname
Else
Set Dlg = Application.FileDialog(msoFileDialogSaveAs)
Dlg.Show
If Dlg.SelectedItems.Count Then
Fullname = Dlg.SelectedItems(1)
ActiveDocument.SaveAs Fullname
Else
Exit Sub
End If
End If
Set Outlook = GetObject(, "outlook.application")
Set Mail = Outlook.CreateItem(0)
Set Att = Mail.Attachments.add(Fullname)
Mail.Subject = Att.DisplayName
Mail.Display
End Sub
|
ReplyAll |
| ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail. |