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

Insert blank line into rich text formula

Status
Not open for further replies.

chicdog

Programmer
Feb 28, 2002
84
US
Is it possible to enter a blank line into a rich text formula? Here's my formula, what it does is it make the word before the ':' bold.
dim InputField as string

IF ISNULL({stpFunctionWorksheet;1.Decor}) or {stpFunctionWorksheet;1.Decor}="" THEN
else
InputField="DÉCOR: " & {stpFunctionWorksheet;1.Decor}


dim Increment as number
dim TempString as string
dim TempStringTwo as string

Increment = 1

if instr(InputField, ": ") > 0 then TempString = InputField(1 to instr(InputField, ": ")) else TempString = InputField
if instr(InputField, ": ") > 0 then TempStringTwo= InputField(length(TempString) + 1 to length(InputField)) else TempStringTwo = ""

formula = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{f0\fswiss\fcharset0 Arial;}}" + "\viewkind4\uc1\pard\b\f0\fs22 " + TempString + "\b0 " + TempStringTwo
END IF


Thanks in advance.
Bryan
 
After I posted this question I figured it out. At the end of the formula statement there should be '+ "\par ".

formula = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{f0\fswiss\fcharset0 Arial;}}" + "\viewkind4\uc1\pard\b\f0\fs22 " + TempString + "\b0 " + TempStringTwo + + "\par "

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top