Hi all! :-{}
I'm working on a project that automatically sends email from lotus 1-2-3 after clicking on a button and it's using Lotus Notes.
1- The person using that application really would like to change the header in Notes to the name of the direction of the company instead of his own name. Is it possible? How?
From Someone From Direction
29-11-2001 ---> 29-11-2001
2- Also, there is a message appearing before the body of the mail that says : Message from an automate process. What's generate that message? How could I change it to have Message sent from Lotus 1-2-3?
Message from an automate process ---> Message sent from Lotus 1-2-3.
Please help me!!!
See below the VB code :
Sub Click(Source As Buttoncontrol)
Dim Doc_msg As Document
Dim SendTo, Ind_Msg, Subject, Body As String
Dim pathName, pathname2, pathname3,fileName, file_name As String
Dim int1 As Integer
Dim message As Variant
Dim info As String
pathName = "d:\GL_Email\Files_WKS\*.*"
pathName2 = "d:\GL_Email\Files_WKS\"
pathName3 = "d:\GL_Email\Files_123\"
fileName = Dir(pathName, 0)
'Exit if there is no *.WKS files
If (fileName = "" Then
message = Msgbox("There's no file to send!",0)
Exit Sub
End If
' Log into the e-mail system.
CurrentApplication.UserLogin "someone/somewhere", "xxxxxx",
Do While fileName <> ""
'Suppression de l'extension
int1 = Instr(filename,".wks"
file_name = Left(fileName, (int1 - 1))
path_file_name = pathName2 & file_name
SendTo = "someone@somewhere"
'Opening *.WKS file
Set Doc_msg = CurrentApplication.OpenDocument(fileName, pathName2,,,,,,)
info = "body of the message"
'header
Ind_Msg = ""
Subject = "Subject of the message"
Body = info
path_file_name = pathName3 & file_name
'Changing file format
Doc_msg.SaveAs path_file_name,"","1-2-3 (123)", False,, False
'Send
Doc_msg.Send SendTo, Ind_Msg, Subject, Body,,,,,,,,,,
'Closing file *.123
Doc_msg.Close False
'Deleting file *.123
Kill path_file_name & ".123"
fileName = Dir()
Loop
message = Msgbox("All files have been sent.",0)
End Sub
I'm working on a project that automatically sends email from lotus 1-2-3 after clicking on a button and it's using Lotus Notes.
1- The person using that application really would like to change the header in Notes to the name of the direction of the company instead of his own name. Is it possible? How?
From Someone From Direction
29-11-2001 ---> 29-11-2001
2- Also, there is a message appearing before the body of the mail that says : Message from an automate process. What's generate that message? How could I change it to have Message sent from Lotus 1-2-3?
Message from an automate process ---> Message sent from Lotus 1-2-3.
Please help me!!!
See below the VB code :
Sub Click(Source As Buttoncontrol)
Dim Doc_msg As Document
Dim SendTo, Ind_Msg, Subject, Body As String
Dim pathName, pathname2, pathname3,fileName, file_name As String
Dim int1 As Integer
Dim message As Variant
Dim info As String
pathName = "d:\GL_Email\Files_WKS\*.*"
pathName2 = "d:\GL_Email\Files_WKS\"
pathName3 = "d:\GL_Email\Files_123\"
fileName = Dir(pathName, 0)
'Exit if there is no *.WKS files
If (fileName = "" Then
message = Msgbox("There's no file to send!",0)
Exit Sub
End If
' Log into the e-mail system.
CurrentApplication.UserLogin "someone/somewhere", "xxxxxx",
Do While fileName <> ""
'Suppression de l'extension
int1 = Instr(filename,".wks"
file_name = Left(fileName, (int1 - 1))
path_file_name = pathName2 & file_name
SendTo = "someone@somewhere"
'Opening *.WKS file
Set Doc_msg = CurrentApplication.OpenDocument(fileName, pathName2,,,,,,)
info = "body of the message"
'header
Ind_Msg = ""
Subject = "Subject of the message"
Body = info
path_file_name = pathName3 & file_name
'Changing file format
Doc_msg.SaveAs path_file_name,"","1-2-3 (123)", False,, False
'Send
Doc_msg.Send SendTo, Ind_Msg, Subject, Body,,,,,,,,,,
'Closing file *.123
Doc_msg.Close False
'Deleting file *.123
Kill path_file_name & ".123"
fileName = Dir()
Loop
message = Msgbox("All files have been sent.",0)
End Sub