how to combine lotus script and HTML in lotus notes 7

100 pts.
Tags:
HTML
Lotus Notes
LotusScript
Helllo, Currently i use the following script to create a selection menu to add either 1 of 3 different signatures. The 3 different signatyures I currently have need to be replaced by 3 different HTML signatures. I simply can not get that to work. Anybody have any ideas? The script I currently use is: keuze:=@Prompt([OkCancelList]: [NoSort] ; "Select a signature"; ""; "Nederlands"; "Nederlands":"Engels":"Intern Fokker"); @If(keuze="Nederlands"; @Command([TextSetFontFace];"Default Sans Serif") + @Command([TextSetFontSize];"10") + @Command([EditInsertText]; @NewLine+ "Met vriendelijke groet,"+ @NewLine+ @NewLine)+ + @Command([EditInsertText];@Name([CN];@UserName)) + @Command([EditInsertText]; @NewLine + "Application Manager")+ @Command([TextSetFontSize];"8")+ @Command([TextSpacingSingle])+ @Command([TextNormal])+ @Command([EditInsertText]; @NewLine + @NewLine + "Fokker Services B.V.")+ @Command([EditInsertText]; @NewLine + "Postbus 231")+ @Command([EditInsertText]; @NewLine + "2150 AE Nieuw-Vennep")+ @Command([EditInsertText]; @NewLine + "Telefoon : 0252 - 627 828")+ @Command([EditInsertText]; @NewLine + "GSM : 06 - 5153 8928")+ @Command([EditInsertText]; @NewLine + "E-mail : martin.broeren@stork.com")+ @Command([EditInsertText]; @NewLine + @NewLine+ "Internet website: http://www.fokkerservices.com" )+ @Command([EditInsertText]; @NewLine+ "Extranet website: https://www.myfokkerfleet.com")+ @Command([EditInsertText]; @NewLine + "Internet website: http://www.stork.com" )+ @Command([EditInsertText]; @NewLine+ @NewLine+ "Fokker Services B.V. is onderdeel van de Stork Groep" )+ @Command([TextNormal]) ;keuze="Engels"; @Command([TextSetFontFace];"Default Sans Serif") + @Command([TextSetFontSize];"10") + @Command([EditInsertText]; @NewLine + "Best regards,"+ @NewLine +@NewLine) + @Command([EditInsertText];@Name([CN];@UserName)) + @Command([EditInsertText]; @NewLine + "Application Manager")+ @Command([TextSetFontSize];"8")+ @Command([TextSpacingSingle])+ @Command([TextNormal])+ @Command([EditInsertText]; @NewLine + @NewLine + "Fokker Services B.V.")+ @Command([EditInsertText]; @NewLine + "P.O. Box 231")+ @Command([EditInsertText]; @NewLine + "2150 AE Nieuw-Vennep")+ @Command([EditInsertText]; @NewLine + "The Netherlands")+ @Command([EditInsertText]; @NewLine + "Office Phone : +31 - (0)252 - 627 828")+ @Command([EditInsertText]; @NewLine + "Cell Phone : +31 - (0)6 - 5153 8928")+ @Command([EditInsertText]; @NewLine + "E-mail : martin.broeren@stork.com")+ @Command([EditInsertText]; @NewLine + @NewLine+ "Internet website: http://www.fokkerservices.com" )+ @Command([EditInsertText]; @NewLine+ "Extranet website: https://www.myfokkerfleet.com")+ @Command([EditInsertText]; @NewLine+ "Internet website: http://www.stork.com" )+ @Command([EditInsertText]; @NewLine+ @NewLine + "Fokker Services B.V. is a member of the Stork Group of Companies" )+ @Command([TextNormal])+ @Command([EditInsertFileAttachment]) ;keuze="Intern Fokker"; @Command([TextSetFontFace];"Default Sans Serif") + @Command([TextSetFontSize];"10") + @Command([EditInsertText]; @NewLine + "Groeten,"+ @NewLine +@NewLine) + @Command([EditInsertText];@Name([CN];@UserName)) + @Command([EditInsertText]; @NewLine + "Application Manager")+ @Command([TextSetFontSize];"8")+ @Command([TextSpacingSingle])+ @Command([TextNormal])+ @Command([EditInsertText]; @NewLine + @NewLine + "Telefoon : 0252 - 627 828")+ @Command([EditInsertText]; @NewLine + "GSM : 06 - 5153 8928")+ @Command([EditInsertText]; @NewLine + "E-mail : martin.broeren@stork.com")+ @Command([TextNormal]) ;"")
ASKED: June 23, 2009  6:48 AM
UPDATED: June 25, 2009  6:52 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

If I understand your question correctly, you currently use the above code to add a TEXT signature to a user’s mail file signature, is that correct?

If so, what you say now is that you want to add an HTML signature to a user’s mail file instead, correct? The only way I know how to do this, is the way I did it in the past. I sent the users an email explaining what it would do, then I had the button create a local HTML file (using LotusScript) that matched specifically to the user’s needs. Then I pointed their CalendarProfile to the HTML file I just created locally.

Unfortunately, this is how the HTML signatures work. Now, if I have misunderstood what you are trying to do, please explain further and I will see if I can help further.

Mike Kinder

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Broeren79
    Hi Mike, You understand correctly. The main reason I want to start using HTML for a signature is that the company demands the Logo (gif/jpg) to be added to the signature. I do need to be able to select either of 3 different signatures when working on the e-mail, so i need a button that works while composing the e-mail. If I read your e-mail correctly, the button you are aiming at will change signatures, but that will be prior to creating a message, right?
    100 pointsBadges:
    report
  • Stiletto
    I think you're going to have to switch from @functions to LotusScript. That will let you use the PassThruHTML property of the NotesRichTextStyle class.
    2,935 pointsBadges:
    report
  • SlikTool
    Yes, that is correct. So you were not using the standard Signature feature of Notes mail, you are generating one on the fly when needed. Is that correct? If so, I think Stiletto might be on to something in that you could inject text into the body and mark it as HTML. I think it is easier said than done though. Another option, which I would have to experiment with, is to make a single HTML file that uses CSS/JavaScript to decide what items are shown. In other words, Create a button to generate a single HTML for a user and point to it as his/her signature file. Then, based on the button that changes the signature use CSS/Javascript (not sure which will be easier here) to hide/show the appropriate HTML in the stored file. What I am not certain about is whether or not this will translate after sending. That is what I would need to check, let me try. Mike Kinder
    1,840 pointsBadges:
    report
  • SlikTool
    Some new information. I did some testing with HTML, and then using Javascript - not doing well with that. For some reason the Javascript DOM in the client thinks that the only element in the body is the body, so when you replace the values originally in the HTML signature it replaces the whole body of the message. There may be some ways around it, but not very clean ways. Maybe an option is to make an HTML file that is just the logo to be included. Then continue to use your script, only have it start before the HTML insert (the image). Would that work?
    1,840 pointsBadges:
    report
  • Broeren79
    Hi Mike, Thanks for all your efforts so far. The last option sounds as it would work, if.... the logo would be at the bottom of the signature. Unfortunately it needs to be some where in the middle. That would render the last option impossible right?
    100 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following