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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lotus Notes Macro 1

Status
Not open for further replies.

xlhelp

Instructor
Dec 7, 2001
2,976
CA
Hi. I have the following formula attached to a Button in Lotus Notes Release 6.5.5. The date shows up as mm/dd/yyyy. I would like it as yyyy/mm/dd or yyyy-mm-dd. Prefer the hyphen over the slash. The user types a sentence or two between the words "Hi" and "Thanks,"

Would appreciate any help.

Also, is there any way to retrieve the initials BG rather than including it as quoted text?

Thanks.


MyFirstName:=@Left(@Name([CN]; @Author); " ");
@Command([EditInsertText];@Text(@Today) + " (BG) Hi. Thanks, " + MyFirstName)


Me transmitte sursum, Caledoni!
 
Ok, I figured out that date is dependent on Regional settings.

So, my second question is still unanswered. Is there a way to retrieve user intials? Thanks.

Me transmitte sursum, Caledoni!
 
The only way to get user initials is to isolate the comon name portion of the user name, then extract the first letter of each word.

A function like this could do it :
Code:
WkName:=@Name([CN];@UserName);
WkWords:=@explode(WkName;" ");
WkFirstLetters:=@left(WkWords;1);
WkInitials:=@Implode(WkFirstLetters;" ")

Of course, the above does not take into account hyphens and collated names, but you get the idea.


Pascal.
 
Hi, Pascal,

Thank you so much. I really appreciate it. It works well, except it adds a space between the intials. Any suggestion? Thanks.

Me transmitte sursum, Caledoni!
 
My bad. the last line should actually read :
Code:
WkInitials:=@Implode(WkFirstLetters;"")

That's why there is a space between the initials. Sorry about that, must have been in auto-type mode when I wrote that :).

Pascal.
 
Hi, Pascal. Thank you so much. Although I know some programming. Notes somehow puzzles me.

Really appreciate your help.

Me transmitte sursum, Caledoni!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top