Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Warrington, Cheshire
    Posts
    355
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Replace mail.oft (OL2000 SR1 Corporate/WG)

    I would like to change the generic format of the "New Mail" forms to include for a From field. (I cannot redefine the From value but I can write to a specific field on a form).
    I opened a new mail, I went to design this form, I saved this form as a template, and I also took the step of Publishing this form (albeit to my personal folder).
    Is it possible to replace the current New Mail form with my new customised form? i.e. when new is selected, my customised form pops up as the mail form?
    I'm reckoning that there is a mail.oft on my C: drive that I currently cannot find (other than the c:Program filesMicrosoft officetemplatesoutlookmail.oft)
    Thanks in advance
    Alan, cheshire

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Replace mail.oft (OL2000 SR1 Corporate/WG)

    There is a tool you can download to make your custom form the default for a particular folder. It was discussed here a long time ago. I tried it for the Inbox (I can't remember why, exactly), and was unhappy with the results because the little informational messages that normally appear at the top, such as tracking information and whether I had replied, no longer appeared.

    For From, you can use View>From Field. This choice should be "sticky" from one new message to the next. How different is the functionality on your custom form?

  3. #3
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Warrington, Cheshire
    Posts
    355
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Replace mail.oft (OL2000 SR1 Corporate/WG)

    Hi jscher,
    The functionality is exactly the same as the standard form plus the From field.
    The reason for wanting to spec the from field by code, is that I'm using Access to e-mail confirmations to users who have sent in their weekly data and I don't want them replying to the original sender of the mail. But the sender of the mail could be any one of five persons who already has their own mail account.
    The From field would be populated with the reply address of say "confirmations@mysite.co.uk"
    Just in case, here's my current code (courtesy of previous posting in lounge):
    Sub SendMail()
    Dim dbs As Database
    Dim rstSupervisors As Recordset
    Dim rstInfo As Recordset
    Dim olApp As New Outlook.Application
    Dim olNewMail As Outlook.MailItem
    Dim olNS As Outlook.NameSpace
    Dim blnStartOutlook As Boolean
    Dim strBody As String

    On Error Resume Next

    If olApp Is Nothing Then
    Set olApp = CreateObject("Outlook.Application")
    If olApp Is Nothing Then
    MsgBox "Can't start Outlook", vbExclamation
    Exit Sub
    End If
    blnStartOutlook = True
    End If
    On Error GoTo Err_SendMail

    Set dbs = CurrentDb
    Set rstSupervisors = dbs.OpenRecordset("tblConfirmations2")
    ' Loop through supervisors
    Do Until rstSupervisors.EOF
    If IsNull(rstSupervisors!email) Then
    Else
    Set olNS = olApp.GetNamespace("MAPI")
    Set olNewMail = olApp.CreateItem(olMailItem)
    olNewMail.Recipients.Add rstSupervisors!email
    olNewMail.Subject = "Employee report for " & rstSupervisors!surn
    strBody = rstSupervisors!forename & " " & rstSupervisors!surn & " timesheet received"
    olNewMail.Body = strBody & vbCrLf & "Please reply to confirmations@mysite.co.uk"
    'olNewMail.fromfield1.Value = "confirmations@mysite.co.uk"
    olNewMail.Send
    End If
    rstSupervisors.MoveNext
    Loop
    rstSupervisors.Close

    Exit_SendMail:
    On Error Resume Next
    rstInfo.Close
    Set rstInfo = Nothing
    rstSupervisors.Close
    Set rstSupervisors = Nothing
    Set olNewMail = Nothing
    If blnStartOutlook Then
    olApp.Quit
    End If
    Set olApp = Nothing
    Exit Sub

    Err_SendMail:
    MsgBox Err.Description, vbExclamation
    Resume Exit_SendMail
    End Sub


    I currently have text in the body which prompts the recipient to reply to the confirmations address, but more often than not, they just hit the Reply button (as do I).

    TIA
    Alan

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Replace mail.oft (OL2000 SR1 Corporate/WG)

    You can specify "reply recipients" directly with VBA. For a primitive, interactive example see <post#=360719>post 360719</post#>. In the context of your code, perhaps:

    olNewMail.ReplyRecipients.Add "confirmations@mysite.co.uk"

  5. #5
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Warrington, Cheshire
    Posts
    355
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Replace mail.oft (OL2000 SR1 Corporate/WG)

    jscher,
    Many many thanks. The replyrecipients.add method works of a sort.
    The mail sent does not indicate the replyrecipient address (probably because my custom form does not include the box as a field) but when the Reply button is hit then the preferred reply address comes into play.
    From the previous post I managed to track down slipstick.com which directed me to many sources for form design. But still couldn't specify the default template.
    I think I'll drop the default route for now and maybe go back to it in spare time (what's that????)

    Alan
    Cheshire, UK

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Replace mail.oft (OL2000 SR1 Corporate/WG)

    It's true, the Reply Recipients are hidden away in the Options dialog (View>Options... when message "inspector" is open). From the recipient's perspective this can lead to bad things happening

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •