HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Software Newsgroups > Microsoft Office

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 10-11-2007, 02:29 PM
Rich
Guest
 
Posts: n/a
Default Outlook 2007 default "Save As" format

Does anyone know how to change the default format to .msg (Outlook
Message Format), when attempting to save messages in Outlook 2007?
Either in the options or through Group Policy?

Thanks

Reply With Quote
Sponsored Links
  #2  
Old 07-22-2008, 12:57 PM
Junior Member
 
Join Date: Jul 2008
Posts: 3
1uk3 is on a distinguished road
Default

Quote:
Originally Posted by Rich View Post
Does anyone know how to change the default format to .msg (Outlook
Message Format), when attempting to save messages in Outlook 2007?
Either in the options or through Group Policy?

Thanks
Hi, I know this is an old post but was wondering if you ever had any luck with this Rich (or anyone else)?

It's not a major issue but would be good if the default could be set - it's surprising that there isn't an option for this that's easy to find.

I'm guessing that it might be that the way to do it is by changing a reg key.

Hope someone can point me in the right direction!
Reply With Quote
  #3  
Old 04-28-2009, 04:41 AM
Junior Member
 
Join Date: Apr 2009
Posts: 1
tsargeant is on a distinguished road
Default

Quote:
Originally Posted by Rich View Post
Does anyone know how to change the default format to .msg (Outlook
Message Format), when attempting to save messages in Outlook 2007?
Either in the options or through Group Policy?

Thanks
I know this is an old post - but I thought I would share this work around I came up with today. ***Warning*** it does make use of VBA and macros.

The theory:
By making use of the Windows API via the VBA editor in outlook - open the fileOpenSave dialog box - set the default file filter for the box - making *.msg as the default option. Once the save button is clicked - the VBA command objItem.SaveAs Filename, olMSG saves the file in the location you browsed to in the dialog box.

By placing an icon on the quick access toolbar in outlook - and selecting a macro as the command to run - you can then have a quick, easy way of saving emails as .msg files to your file system.

The API call can be found at: API: Call the standard Windows File Open/Save dialog box (many thanks to these guys - awesome code samples)

My Code: (this is the macro you need to point to)

Sub SaveAsMSG()
Dim myItem As Outlook.Inspector
Dim objItem As Object

Dim strFilter As String
Dim strInputFileName As String
Dim InitDir As String
Dim Subject As String
Dim FileYear
Dim FileMonth
Dim FileDay


Set myItem = Application.ActiveInspector
If Not TypeName(myItem) = "Nothing" Then
Set objItem = myItem.CurrentItem
Subject = objItem.Subject

'InitDir change this to the default directory you would like to point at
InitDir = "Y:\"


'\ / : * ? " < > | (invalid characters to be removed from filename)

'Subject parsing
If Subject <> "" Then
For a = 1 To Len(Subject)
test = InStr(a, Subject, "\")
If test > 0 Then Mid(Subject, test) = "-"
test = InStr(a, Subject, "/")
If test > 0 Then Mid(Subject, test) = "-"
test = InStr(a, Subject, ":")
If test > 0 Then Mid(Subject, test) = " "
test = InStr(a, Subject, "*")
If test > 0 Then Mid(Subject, test) = "-"
test = InStr(a, Subject, "?")
If test > 0 Then Mid(Subject, test) = "-"
test = InStr(a, Subject, """")
If test > 0 Then Mid(Subject, test) = "'"
test = InStr(a, Subject, "<")
If test > 0 Then Mid(Subject, test) = "-"
test = InStr(a, Subject, ">")
If test > 0 Then Mid(Subject, test) = "-"
test = InStr(a, Subject, "|")
If test > 0 Then Mid(Subject, test) = "-"
Next a
End If

'************************************************* **
'Company specific filename prefix this section can be Rem'd out
'if need be - it prefixes (yymmdd) 090428 as a date stamp to the filename
'strFileTitle - sets the default filename to be displayed in the dialog box

FileYear = Right(Year(Now), 2)
FileMonth = Format(Month(Date), "00")
FileDay = Format(Day(Now), "00")
strFileTitle = FileYear & FileMonth & FileDay & " - " & Subject
'************************************************* ***
strFilter = ahtAddFilterItem(strFilter, "MSG Files (*.msg)", "*.msg")
strFilter = ahtAddFilterItem(strFilter, "HTML Files (*.HTML)", "*.HTML")
strFilter = ahtAddFilterItem(strFilter, "Text Files (*.txt)", "*.txt")
strFilter = ahtAddFilterItem(strFilter, "all Files (*.*)", "*.*")

strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, _
InitialDir:=InitDir, _
OpenFile:=False, _
Filename:=strFileTitle, _
FileTitle:=strFileTitle, _
DialogTitle:="Save Email as...", _
Flags:=ahtOFN_HIDEREADONLY)

If Len(strInputFileName) > 0 Then
FileExt = Right(strInputFileName, 4)
Filename = strInputFileName

Select Case FileExt

Case ".msg"
objItem.SaveAs Filename, olMSG

Case "HTML"
objItem.SaveAs Filename, olHTML

Case ".txt"
objItem.SaveAs Filename, olTXT

End Select

Exit Sub
End If

Else
MsgBox "Please double click an email to open it - before saving as an external file", vbInformation + vbOKOnly, "Outlook SaveAs dialog"
End If

End Sub



Hope this helps - Tremayne.
Reply With Quote
  #4  
Old 07-18-2009, 01:47 AM
DM2 DM2 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 1
DM2 is on a distinguished road
Default

A couple of questions regarding the macro.

1. How would one change the macro so that it would allow the user to "Explorer" for a directory to save the message to?

2. I copied, and pasted your macro into outlook but am getting an "Compile error: Sub or Function not defined" with the following line:

Quote:
strFilter = ahtAddFilterItem(strFilter, "MSG Files (*.msg)", "*.msg")
I suspect the same will happen with the other 3 lines of code following this message.

Any suggestions?

3. I'm not sure if the time and date prefix is saving the file with the time and date stamp at the time the file was saved, or when the file was received because I can't get the macro to run. Is it possible to have it use "Received" time date to stamp the file?

Regards,
Dan
Reply With Quote
Sponsored Links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Open" and "Save As" boxes freeze (Office 2003) when changing fold Travis Microsoft Office 1 09-19-2007 07:37 PM
Change default "File / Save As" folder globally in Windows XP? Michele Windows XP 3 09-10-2007 01:35 PM
Change Microsoft "Works (word)" default save location. Howkat Windows Vista 3 05-23-2007 07:00 AM
Office 2007 "Not Responding" if try to close too soon after save funnybroad Microsoft Office 0 05-02-2007 04:09 AM
Internet Explorer 7 for Windows Vista not prompting me to "Open/Run" or "Save" files Brandon Taylor Windows Vista 2 04-02-2007 12:57 AM


All times are GMT. The time now is 09:00 AM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger