Examples

Inserting an Invisible Memo Header

Invisible memo headers can be edited and inserted using the ^S ^H command.  However, in most cases, if you are using invisible headers, you will want to insert them automatically under program control. The procedure is identical to that given in the previous example, except that we need to add the invisible header command keystrokes and text in the preload string. To insert the variable contents CUSNUM$ in the example given above, we would have:

OPCODE = MMO'EDT + MMO'BDR + MMO'LID

TEXT = PROMPT$ + "~"

TEXT = TEXT + chr$(19) + chr$(8) + CUSNUM$ + chr$(19)

IF LINK<>0 TEXT = TEXT + chr$(5) + chr$(13)

TEXT = TEXT + TODAY$ + " " + HOUR$ + " "

XCALL INMEMO,OPCODE,TEXT,CHAN,STROW,STCOL,ENDROW, &

ENDCOL,LINK,XPOS,VSPEC,MMOCLR,EXTCTL

IF POS <> 0 CALL INMEMO'ERROR'RECOVERY

Note that you may want to only insert the header when adding a new memo, although inserting one in a memo with an existing header which just replace the existing header.