100 pts.
 how to combine lotus script and HTML in lotus notes 7
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]) ;"")

Software/Hardware used:
ASKED: June 23, 2009  6:48 AM
UPDATED: June 25, 2009  6:52 AM

Answer Wiki:
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
Last Wiki Answer Submitted:  June 24, 2009  2:59 am  by  SlikTool   1,830 pts.
All Answer Wiki Contributors:  SlikTool   1,830 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 pts.

 

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,700 pts.

 

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,830 pts.

 

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,830 pts.

 

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 pts.