Groups | Search | Server Info | Login | Register


Groups > comp.groupware.lotus-notes.programmer > #75

Re: How do I add a new line to a text field via LotusScript?

Newsgroups comp.groupware.lotus-notes.programmer
Date 2016-10-17 14:14 -0700
References <843148392.19258.0@squark.demon.co.uk>#1/1>
Message-ID <64b2fcaf-de02-4752-b562-b581f52a023e@googlegroups.com> (permalink)
Subject Re: How do I add a new line to a text field via LotusScript?
From mervint@gmail.com

Show all headers | View raw


On Thursday, September 19, 1996 at 1:00:00 AM UTC-6, Alastair Booker wrote:
> Hi,
> 
> I have a LotusScript macro that makes changes to a document. In amongst these 
> changes, I wish to add a value to the start of a text field, but on a new line 
> in that text field rather than just appended straight to what's already there.
> 
> I'm currently trying with this:
> 
> doc.Edit_History = "Change: " + Format$(Now(),"dd/mm/yy hh:mm:ss") + Chr$(13) + 
> Chr$(10) + doc.Edit_History(0)
> 
> But... the CR and LF get replaced by strange block characters after this has 
> been run. Also, any new lines already in the text field (placed there by 
> @NewLine from a formula-based macro) are changed to these characters...
> 
> Any ideas?
> 
> Thanks,
> 
> - Ali
> 
> (ali@squark.demon.co.uk)

This answer comes after 10 year. Was doubtful whether to post it.. But someone else may be benefited. 

The following code will insert a line before and after insertion text.

uidoc.InsertText Chr$(10) & insertionText & Chr$(10)

I tried different combinations before arriving at this. 

Thank you
Mert

Back to comp.groupware.lotus-notes.programmer | Previous | NextNext in thread | Find similar


Thread

Re: How do I add a new line to a text field via LotusScript? mervint@gmail.com - 2016-10-17 14:14 -0700
  Re: How do I add a new line to a text field via LotusScript? Kirk Stoner <kirkstonersystemsarchitect@gmail.com> - 2023-05-22 11:35 -0700
    Re: How do I add a new line to a text field via LotusScript? Kirk Stoner <kirkstonersystemsarchitect@gmail.com> - 2023-05-22 11:39 -0700

csiph-web