Windows XP

Windows Explorer “Send To” in HTML with Signature and Multiple Attachments

Have just recently finished putting together a bulk mailing application inside Excel to email preformatted html newsletters with embedded images. I learned a lot in the process and was able to solve a problem that has irritated me for years.

Previous research led me to the Micro$oft’s support website to this solution but it only attaches one of however many files you may have selected. I am now using a visual basic script file to replace the default MAPIMail link. It can send attachments via the explorer context menu in html format, with my default signature AND multiple attachments. It works for me with XP and Outlook 2007 so I hope it will for other versions of Outlook.

Create a new text document in Notepad, paste the code from below and save the file somewhere safe. Rename the file to “Mail Recipient.vbs”. Next create a shortcut and rename that to “Mail Recipient”. Customize the shortcut’s icon to the one found in C:/Windows/System32/Sendmail.dll and move your new shortcut to your “Send to” folder e.g. “C:\Documents and Settings\Stephen\SendTo\Mail Recipient.lnk”. Rather don’t delete the original MAPIMail link, just change it’s attributes to hidden (you may want it back again later).

Option Explicit
Dim objArgs, OutApp, oNameSpace, oInbox, oEmailItem, olMailItem
Dim a, oAttachments, subjectStr, olFormatHTML
olMailItem = 0
olFormatHTML = 2
Set objArgs = WScript.Arguments 'gets paths of selected files
Set OutApp = CreateObject("Outlook.Application") 'opens Outlook
Set oEmailItem = OutApp.CreateItem(olMailItem) ' opens new email
For a = 0 to objArgs.Count - 1
Set oAttachments = oEmailItem.Attachments.Add(objArgs(a))
subjectStr = subjectStr & Right(objArgs(a),Len(objArgs(a))-(InStrRev(objArgs(a),"\"))) & ", " 'recreates the default Subject e.g. Emailing: file1.doc, file2.xls
Next
If subjectStr = "" then subjectStr = "No Subject "
oEmailItem.Subject = "Emailing: " & Left(subjectStr, (Len(subjectStr)-2))
oEmailItem.BodyFormat = olFormatHTML
oEmailItem.Display

Windows XP dialogs using bold fonts

For some unknown reason (probably a badly written third party software) some of my applications were suddenly using a bold font in their dialog boxes. This sometimes resulted in options being hidden off the edge of the dialog window or description text being truncated. This was evident in the following places:

  • the Download Accelerator Plus options window
  • the clock in the task bar
  • various applications’ About windows
  • the list box label “class” in the Dreamweaver 8 properties inspector panel for tables (bad coding on the part of the Macromedia / Adobe programmers since the font specification is obviously wrong in the actual application)

Apart from a recommendation requiring an in-place upgrade of windows from the CD there appeared to be no other fixes that would work. I tried reinstalling the default XP fonts but this didn’t help. I then noticed after checking against the list of default windows fonts that I found here, that MS Sans Serif wasn’t listed in my Fonts folder. Then more googling revealed that MS Sans Serif is actually called sserife.fon and actually was in my Fonts folder so that couldn’t be the problem could it? Further research lead me to open Regedit from the run box to look at my registry and I saw that

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes

substitutes Helv with MS Sans Serif, but when I look at the list of fonts in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

there was no path reference to the MS Sans Serif font file. So does this mean that windows doesn’t know that it exists even if it’s in the Fonts folder? Ready to try anything, I created the string:

Name: MS Sans Serif

Type: REG_SZ

Data: sserife.fon (no path required if it’s in the Fonts folder)

I then closed Regedit and restarted Windows and voilĂ  it was FIXED!!!