reclusivemonkey
Programmer
Hello Everyone,
I am new to this forum, so please excuse any faux pas. I have a problem with sending emails from access through groupwise. I have a form from which I select the criteria for my report, one of which is a ComboBox with the person's name and email address. The email addresses on our intranet work fine (forename.surname@organisation.com), however when the email addresses are external, forename.surname@organisation.com, groupwise is removing everying after the first period, and sending to forename@organisation.com. The 'To:' field appears correct, and even the link in the properties of the sent email in groupwise shows the full address, but under 'Recipients' there is @organisation.com and then surname forname where there should be @organisation then forename.surname. Has anyone experienced this before? I saw a link to the Novell site but it just led me to the first page and I couldn't find anything in the forums. I know this is probably more Groupwise than Access but I've had no luck finding a solution anywhere. Thanks in advance for any help. The code is below, just in case.
Private Sub Email_Detail_Report_Click()
' Macro to send Tab Detail RTF format report
' In order to accomplish what we want, we need to firstly set the criteria for the report (Financial Year, Month, Cost Centre, FMO)
' then produce the report with the criteria title and save a copy. We can then export this copy in RTF format and send via email.
' Declarations
Dim rpt As Report
Dim frm As Form, ctl As Control
Dim stDocName As String ' Standard report template name
Dim stExpName As String ' Exported report name
Dim CCENT_CODE As String
Dim MONTH As String
Dim abvMONTH As String
Dim EmailAddress As String
Set frm = Forms!Switchboard
Set ctl = frm!Tabs_Criteria
MONTH = Me.Report_Month.Column(1)
abvMONTH = UCase(Left(MONTH, 3)) ' Abbreviate month as we are limited to eight character filenames
stDocName = "rptTabDetail"
' Get the report criteria from the form
MailRecipient = ctl.Column(0) ' Who we are mailing to
EmailAddress = ctl.Column(1) ' Their email address
Forename = ctl.Column(3) ' Their forename
CCENT_CODE = ctl.Column(2) ' The cost centre
stExpName = CCENT_CODE & "-" & abvMONTH ' The exported report name
' Copy the report with its criteria name
DoCmd.CopyObject , stExpName, acReport, stDocName
' Email message
msg = "Dear " & Forename & "," & Chr(10) & Chr(10) & "Please find enclosed your detailed tab report for the month of "
msg = msg + MONTH & ". Regards, "
' Send the report
DoCmd.SendObject acSendReport, stExpName, acFormatRTF, EmailAddress, , , "Tab Report for " & MONTH, _
msg, True
' Delete the report (remember this is not the template, simply the one we had copied in order to send with the correct name
DoCmd.DeleteObject acReport, stExpName
End Sub
I am new to this forum, so please excuse any faux pas. I have a problem with sending emails from access through groupwise. I have a form from which I select the criteria for my report, one of which is a ComboBox with the person's name and email address. The email addresses on our intranet work fine (forename.surname@organisation.com), however when the email addresses are external, forename.surname@organisation.com, groupwise is removing everying after the first period, and sending to forename@organisation.com. The 'To:' field appears correct, and even the link in the properties of the sent email in groupwise shows the full address, but under 'Recipients' there is @organisation.com and then surname forname where there should be @organisation then forename.surname. Has anyone experienced this before? I saw a link to the Novell site but it just led me to the first page and I couldn't find anything in the forums. I know this is probably more Groupwise than Access but I've had no luck finding a solution anywhere. Thanks in advance for any help. The code is below, just in case.
Private Sub Email_Detail_Report_Click()
' Macro to send Tab Detail RTF format report
' In order to accomplish what we want, we need to firstly set the criteria for the report (Financial Year, Month, Cost Centre, FMO)
' then produce the report with the criteria title and save a copy. We can then export this copy in RTF format and send via email.
' Declarations
Dim rpt As Report
Dim frm As Form, ctl As Control
Dim stDocName As String ' Standard report template name
Dim stExpName As String ' Exported report name
Dim CCENT_CODE As String
Dim MONTH As String
Dim abvMONTH As String
Dim EmailAddress As String
Set frm = Forms!Switchboard
Set ctl = frm!Tabs_Criteria
MONTH = Me.Report_Month.Column(1)
abvMONTH = UCase(Left(MONTH, 3)) ' Abbreviate month as we are limited to eight character filenames
stDocName = "rptTabDetail"
' Get the report criteria from the form
MailRecipient = ctl.Column(0) ' Who we are mailing to
EmailAddress = ctl.Column(1) ' Their email address
Forename = ctl.Column(3) ' Their forename
CCENT_CODE = ctl.Column(2) ' The cost centre
stExpName = CCENT_CODE & "-" & abvMONTH ' The exported report name
' Copy the report with its criteria name
DoCmd.CopyObject , stExpName, acReport, stDocName
' Email message
msg = "Dear " & Forename & "," & Chr(10) & Chr(10) & "Please find enclosed your detailed tab report for the month of "
msg = msg + MONTH & ". Regards, "
' Send the report
DoCmd.SendObject acSendReport, stExpName, acFormatRTF, EmailAddress, , , "Tab Report for " & MONTH, _
msg, True
' Delete the report (remember this is not the template, simply the one we had copied in order to send with the correct name
DoCmd.DeleteObject acReport, stExpName
End Sub