The Vault section of the Jesus Army site Go to the home page of the Jesus Army site Downloads Coming Events Jesus Army Forum Links Search
Jesus Army Multiply Christian Network New Creation Christian Community Jesus Centres Jesus People Shop Audio, Video, Literature... Contact Us
  Video Library Audio Images Freeware Links Searches Jesus Army  
You are here:

VAULT
Freeware
Email
Macros
Sitemap

Bookmark


We'd like to
hear from you.
Click to contact us.


All pages © Jesus Army
EMAIL MACROS
Macros for MS Office and Pegasus Mail


Macros for MS Office with Pegasus Mail
A set of macros for MS Word and Excel to integrate Pegasus Mail with MS Office. I've tested them quite with Office 2000 and 2002, but they should work with other versions. Download link above, sketchy (but important) details below. Please let me know of any problems.

MS Word macros

Normal.txt contains a set of macros that can just be copied and pasted into the macro area of your normal.dot template file. To initiate this, first create a dummy global macro (by recording one from Tools | Macro | Record) and then edit it (Tools | Macro | Macros...)

Alternatively copy one of the supplied normal.dot files from either the Word2000Full, Word 2002Context or Word2002Full folders to your your Word template directory (...Application Data\Microsoft\Templates). The exact location depends on your version of Windows, and whether you have profiles active or not. The "Full" normal.dot templates have all the macros on the toolbars and menus, the other one is context-sensitive, but requires Outlook to be installed but non-functional. Choose the most appropriate version to use.

Please note that these versions of normal.dot use UK English -- you may need to modify it from Tools | Language | Set Language | Default ...

Functionality

Automatically replaces Email button in Standard toolbar (which is present if Outlook installed)

Automatically replaces the following built in commands in the File menu:

  1. Send to Mail Recipient (present if Outlook installed)
  2. Either Send to Mail Recipient (as Attachment) (present if MAPI installed) or Send to Mail Recipient (as Text) (present if MAPI installed) according to settings in Tools | Options | General | Mail as Attachment
  3. Send to Mail Recipient (for Review) (appears in Word 2002 if MAPI installed)
  4. Send to Exchange Folder [limited functionality]
  5. Send to Routing Recipient

Automatically replaces End Review in the Reviewing toolbar (in Word 2002)

Automatically replaces Return from Review in the Reviewing toolbar (in Word 2002)

Automatically disables the following commands to avoid conflict with Outlook:

  • File | New | Blank email [creates a blank default document]
  • Email Send now button

Additional macros which can be used via Tools | Customize or the attached normal.dot

  • Send to Mail Recipient (as Attachment)
  • Send to Mail Recipient (as Plain Text)
without needing to change the settings in Tools | Options | General | Mail as Attachment

Alternative macros

  • Send as Attachment by Simple MAPI
  • Send as Attachment by DDE

Configuration (Important!)

Install Simple MAPI from the Pegasus installation folder by running wpmmapi.exe and choosing (care needed) Simple MAPI.

You MUST change the value of GetPegasusFolderPath (at the start of the macros) to whatever is appropriate for your setup.

If you find that two emails are sent when you run SendForReview, change the value of IsMapiOK to True. This also affects FilePost.

You will probably need to alter Function IsLocal to identify your shared folders.

If you do not have Outlook installed, you will probably want to add at least the "Email" macro to your toolbar and to the File | Send To menu for Mail Recipient functionality. To customize your toolbars and menus, go to Tools | Customize. If you want help then click on Microsoft's help button. The best way to get icons for the toolbars or menus is to add a built-in command with the icon you want to use to the menu or toolbar, copy and paste the image into the macro command on the menu or toolbar, close Word (so saving the modified normal.dot), re-open Word, go to Tools | Customize, and only then delete the built-in command that you added previously.

The "Full" versions of Normal.dot included have all the macros added to the menus.

Details of macros

Each of these macros starts Pegasus if not already running.

FileSendMail
Uses the name of a built-in command to replace a menu item. Replaces File | Send To | Mail Recipent (as Attachment) or File | Send To | Mail Recipent(as Text), depending on setings in Options | General. It calls Send_to_Pegasus or PasteAsPlainText macros as appropriate.
Send_to_Pegasus
Sends the active Word document to Pegasus Mail as an attachment using WSENDTO.EXE.
The active document is first saved if necessary, then resaved as a temporary file as Pegasus cannot send documents that are open in Word. Temporary files produced by this macro that are over a week old are automatically deleted when this macro is run.
If WSENDTO.EXE was not installed by default, you can download it from the normal Pegasus downloads page.
PasteAsPlainText
Pastes the current active Word document (or selection) to Pegasus Mail as a new plain text message.
EmailEnvelope
Uses the name of a built-in command to replace a menu item.
Replaces File | Send To | Mail Recipient menu command and the E-mail button on the toolbar.
Pastes the current active Word document (or selection) to Pegasus Mail as a new message.
Email
Just a simple name for EmailEnvelope so that the toolbar tooltip says "Email".
FileRoutingSlip
Uses the name of a built-in command to replace a menu item. Replaces File | Send To | Routing Recipient Pastes the current active Word document (or selection) to Pegasus Mail as a new circulation message.
SendForReview
Uses the name of a built-in command to replace a menu item. Starts the Review cycle in Word 2002+ and sends the document to Pegasus as an attachment, with a covering note asking for the document to be reviewed and returned. Gives acceptable functionality in earlier versions
EndReview
Uses the name of a built-in command to replace a context-sensitive toolbar item. Ends the Review cycle in Word 2002+. Not needed in earlier versions.
ReturnReview
Uses the name of a built-in command to replace a context-sensitive toolbar item. Participates in the Review cycle in Word 2002+. Not needed in earlier versions.
FilePost (Send to Exchange Folder)
Uses the name of a built-in command to replace a menu item. Replaces File | Send To | Exchange Folder, which is supposed to depend on having Exchange installed. Alternative functionality: starts review process, saves document to a shared folder, send notification by Pegasus. You have to define what is meant by a shared folder by tweaking the code at the start of the macro document. Currently, you are warned if the folder does not have "shared" in its name, and not allowed to use files saved on C: or U: but this can be readily modified.
FileNewEmail
Uses the name of a built-in command to replace a menu item and provide limited functionality by creating a blank default document. Replaces File | New... | Blank Email to avoid conflict with Outlook.
EmailSend
Uses the name of a built-in command to replace a menu item and avoid conflict with Outlook.
Send_to_Pegasus_DDE
Alternative macro, can be used to replace Send_to_Pegasus in case of trouble. Sends the active Word document to Pegasus Mail as an attachment using the built-in DDE facility.
The active document is first saved if necessary, then resaved as a temporary file as Pegasus cannot send documents that are open in Word. Temporary files produced by this macro that are over a week old are automatically deleted when this macro is run.
Send_to_Pegasus_MAPI
Alternative macro, can be used to replace Send_to_Pegasus in case of trouble. Sends the active Word document to Pegasus Mail as an attachment using Simple MAPI and MAPISEND.EXE.
The active document is first saved if necessary, then resaved as a temporary file as Pegasus cannot send documents that are open in Word. Temporary files produced by this macro that are over a week old are automatically deleted when this macro is run.
For this to work you must (a) activate Simple MAPI by running WPMMAPI.EXE from your Pegasus installation folder, and choosing "Simple MAPI" rather than MAPI 1.0 and (b) download MAPISEND.EXE from http://www.lexacorp.com.pg/mailsoft.html.

MS Excel macros

Personal.txt contains a set of macros that can just be pasted into the macro area of your personal.xls file. To initiate this, first create a dummy personal macro (by recording one from Tools | Macro | Record New Macro...) and then edit it (go to Tools | Macro | Macros...). You should then use Tools | Customize to alter the menus and tool bars.

Alternatively place personal.xls in your Excel startup directory (...Application Data\Microsoft\Excel\XLStart) and Excel10.xlb, which contains the customized toolbars and menus in ...Application Data\Microsoft\Excel. The exact location depends on your version of Windows and whether you have profiles active or not.

Important: You MUST change the value of GetPegasusFolderPath (at the start of the macros) to whatever is appropriate for your setup.

Each of these macros starts Pegasus if not already running.

Send_to_Pegasus
Sends the active Excel workbook to Pegasus Mail as an attachment using WSENDTO.EXE.
The active workbook is first saved if necessary, then resaved as a temporary file, as Pegasus cannot send documents that are open in Office. Temporary files produced by this macro that are over a week old are automatically deleted when this macro is run.
If WSENDTO.EXE was not installed by default, you can download it from the normal Pegasus downloads page.
Paste_to_Pegasus
Pastes the current selection in Excel to Pegasus Mail as a new message. This works for a selected range or chart. If you have selected a portion of a chart, the full chart is pasted.
Circulate_to_Pegasus
Pastes the current selection in Excel to Pegasus Mail as a new circulation message. This works for a selected range or chart. If you have selected a portion of a chart, the full chart is pasted.