Office 2003 - adding a file extension to the "files of type" drop down menu in outlook

Posted on 2006-05-25
Medium Priority
Last Modified: 2010-05-18
Win Xp / Office 03 - I'd like to add a file extension to the "files of type" section of the insert file menu from within outlook. I know I proably will have to do a little registry hacking but I'm not sure of the path.

Any help is greatly appreciated!
Question by:bamcguire

Accepted Solution

garlin007 earned 1000 total points
ID: 16771540
My guess is that the file type information is hard coded in C:\Program Files\Common Files\Microsoft Shared\Office10\1033\MSOINTL.DLL

If your intent is to modify the list for the purposes of attaching files to e-mails (and I am assuming you are using Word as your editor), then I don't think you will be able to add to the list just by editing the registry. I think that your best bet will be to trap the opening of the File Open dialog by substituting your own command for the file open event. Then open your own version of the file dialog instead of letting the system do it.

A tip for creating your own macro to replace a built-in word function is here:

I created a replacement for the InsertFile command in Normal.DOT. InsertFile is what is run when you use Insert, File... in Word. The following macro was inserted in the NewMacros module

Option Explicit

Sub InsertFile()
' InsertFile Macro
' Inserts the text of another file into the active document

End Sub

I am assuming this is the first macro you are creating, so I show the Option Explicit, which I suggest you make the first line if it isn't already there (there is a configuration option to set to get this automatically).

I converted the macro to this

Sub InsertFile()
' InsertFile Macro
' Inserts the text of another file into the active document
   Dim MyFileDialog As Office.FileDialog
   Dim MyFileOpenDialog As Dialog
   Dim MyFilter As FileDialogFilter
   'Add a "Music Filter" to FileDialog(msoFileDialogOpen) as the second on the list
   Set MyFileDialog = Application.FileDialog(msoFileDialogOpen)
   Set MyFilter = MyFileDialog.Filters.Add("Music Files", "*.mid;*.wav", 2)
   'Choose the Music Files filter to be the one displayed.
   MyFileDialog.FilterIndex = 2
   'Show the dialog
   'Remove the added filter so only the standard filters remain.
   If MyFilter.Description = MyFileDialog.Filters(2).Description Then
      Call MyFileDialog.Filters.Delete(2)
   End If
   'Take the first selected item and put it in the built-in Insert File dialog and execute
   Set MyFileOpenDialog = Dialogs(wdDialogInsertFile)
   MyFileOpenDialog.Name = MyFileDialog.SelectedItems(1)
End Sub

I could not find an easy way to modify the filter list in Dialogs(wdDialogInsertFile), so instead I showed FileDialog(msoFileDialogOpen) dialog, which is very similar. Then I took the selected file from that dialog and inserted it into the Dialogs(wdDialogInsertFile) dialog and executed it without showing it.

You would have to modify other procedures for File Open or whatever dialog opens in Outlook to attach a file in a similar way.

Author Comment

ID: 16793544
Thanks for the help Garlin007 - that seems to have done the trick. Its a shame there's no easier way to reslove the issue but...what ever works :)

Thanks again - it looks like you put out some real effort to help me reslove my problem and its a appreciated.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question