Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Lotus Notes header and automatic generated message

Status
Not open for further replies.

SMessier

MIS
Oct 31, 2000
4
CA
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 <> &quot;&quot;

'Suppression de l'extension
int1 = Instr(filename,&quot;.wks&quot;)
file_name = Left(fileName, (int1 - 1))
path_file_name = pathName2 & file_name

SendTo = &quot;someone@somewhere&quot;

'Opening *.WKS file
Set Doc_msg = CurrentApplication.OpenDocument(fileName, pathName2,,,,,,)


info = &quot;body of the message&quot;


'header
Ind_Msg = &quot;&quot;
Subject = &quot;Subject of the message&quot;
Body = info
path_file_name = pathName3 & file_name

'Changing file format
Doc_msg.SaveAs path_file_name,&quot;&quot;,&quot;1-2-3 (123)&quot;, 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 & &quot;.123&quot;

fileName = Dir()
Loop
message = Msgbox(&quot;All files have been sent.&quot;,0)
End Sub


 
The answer to number 1 is easy. Number 2 will require further review.

1. The header is controlled by the mail file owner listed in the calender profile. You can create an entry in the NAB for what you would like to have appear in the heading i.e. first name =The, last name = Company. Your user can then either set their calender profile to the company as the owner (and a sent by: field will appear with their name. I do not know how that will affect the sent by you already have.) Or you can actually create a mail box for &quot;The Company&quot; and have the &quot;someone/somewhere&quot; log into that mail box.
 
Hey gamesman, I didn't expect a response as soon! Thanks! :-D

I've tryed to create an entry in the NAB. It works but only when I create a memo from my mailbox. When I use the VB script in Lotus 1-2-3 (the one above) , the header is shown using the default format i.e. the &quot;pencil&quot;, the username and the TOD.

Do you know why??

I need to bring a precision for number 2.

I want :
Message sent from Lotus 1-2-3 ---> Message from an automate process

Not :
Message from an automate process ---> Message sent from Lotus 1-2-3.

Thank you again! :)
 
Can you generate a message to be sent to me or copy and paste the header into a message then forward. It would help to see the entire header.

jhughes@barbhosp.com

You say the entry only works from your mailbox. If more than one person will be using the script then I'd actually create a mailbox to go with that entry and hardcode the mailbox access into the script. Go to the mailbox and give everyone (or just the script users depending upon quantity) author access in the ACL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top