Skip to main content link. Accesskey S
  • HCL Logo
  • HCL Notes and Domino wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Learning Center > Tutorials > Tutorial: Creating a SpamLearn macro in Outlook 2007
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Modify Quarantine Report Templates

The Quarantine Report Templates allow administrators to control what end users see in the quarantine reports they receive via email. Default templates are available for most languages and do not require customization. If you want to customize a template, see the example below on how to add a ...

Message Tracking with Log Files

There are four key log files that can help you quickly and easily diagnose mail flow issues with Protector: SMTP, Filters, Messages and SMAIL.  You can access all of these log files by logging into the console of the appliance with the root account.. SMTP varlogxmailsmtpYYYYMMDDHH00 This logs ...

Tutorial: Creating a SpamLearn macro in Outlook 2007

First, to avoid security issues, create a self certification that you'll use with your macros. Run the following selfcert program: C:Program FilesMicrosoft OfficeOFFICE12selfcert.exe enter your name or any string there Go back to Outlook Type Alt+F11 (or go to ToolsMacroVisual Basic ...
Learning Center articleTutorial: Creating a SpamLearn macro in Outlook 2007
Added by IBM contributor~Ted Minjumiettu | Edited by ~Lex Xanfreemar on July 29, 2011 | Version 3
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
No abstract provided.
Tags: Outlook Macro Spam
First, to avoid security issues, create a self certification that you'll use with your macros.
 
Run the following selfcert program: C:\Program Files\Microsoft Office\OFFICE12\selfcert.exe enter your name or any string there

** Go back to Outlook

Type Alt+F11 (or go to Tools->Macro->Visual Basic Editor)

Right-click on the Projects1 item in the project tree, then click Insert->Module the code window for the new module should open on the right

Paste the following code into that code window:

Sub SpamLearnForward()
Dim mySelection As Outlook.Selection
Dim curObject As MailItem
Dim myMail As MailItem
Dim myDeletedItemsFolder As MAPIFolder

Set mySelection = ActiveExplorer.Selection
Set myDeletedItemsFolder = GetNamespace("MAPI").GetDefaultFolder(olFolderDeletedItems)

For x = 1 To mySelection.Count
Set curObject = mySelection.Item(x)
Set myMail = CreateItem(olMailItem)
myMail.Attachments.Add curObject
myMail.Recipients.Add "spamlearn@spam.iss.net"
myMail.Send
If Not (ActiveExplorer.CurrentFolder.Name = myDeletedItemsFolder.Name) Then
curObject.Move myDeletedItemsFolder
End If
Next x
End Sub


Now click Tools->"Digital Signature"
then click Choose the digital signature that you created in the first step
Save the macro by clicking the save button on the macro editor toolbar
close the macro editor.

Create a custom toolbar button



The following steps are to create a custom button for the spamlearn operation:

1.) Right-click on any of your toolbars in outlook, then click "customize"

2.) Click "Macros" in the categories list, you'll see the spamlearnforward macro on the right.

3.) Drag the spamlearnforward macro to wherever you want in your toolbar

4.) Right-click on the newly dragged icon in your toolbar and click in the name field to shorten it to whatever you want.

5.) Click on "Close" in the Customize dialog box

Now you can use the spamlearn forward by clicking on a spam in your inbox, then clicking on the button you created. you will notice that the spam is forwarded (by checking your sent items) and deleted (by the fact that it is now gone).

  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (1)
collapsed Versions (1)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (3)Jul 29, 2011, 6:17:15 PM~Lex Xanfreemar  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL Software
  • Privacy
  • Accessibility