Please enable JavaScript to view this site.

 

Navigation: Messages > Run-Time Messages > Other Messages

Could not apply format, markers missing

Scroll Prev Up Next More

This run-time message occurs if, at one point during the p-Code generation stage of diary generation, some text was marked to be later modified (usually replacing some characters by the appropriate Moon phase symbol or holidays symbol), but the text is no longer there to be processed when all these replacements are later attempted.

 

This warning usually comes due to some text being filtered-out due to the following options:

 

•Using the Use Filter Below or No Duplicates filter options of holiday symbols options of the holidays (display) properties.

•Using the Combine Multi-Day Holidays options in the text/token surrounding holiday name options of the holidays (multiple) property.

•Using the macro function FormatText and then altering or removing all or part of the marked string returned by that function.

 

In the 2 first cases, above, you can usually ignore the warning, if the output looks OK.

 

Precautions to use with FormatText

 

If the warning comes from the use of FormatText, prepare the text before applying formatting, and preserve the complete marked result afterward. You can concatenate complete formatted results with other text; avoid editing inside them or discarding them while expecting their deferred formatting commands to succeed.

 

Below is an example of code that will cause the present message; the macro is modifying the text after calling FormatText.

sText = FormatText('Monday', 'COLOR(RED)', -1)
sRESULT = UpperCase(sText)

FormatText records a formatting command for the marked string containing Monday. Changing that text to MONDAY means that the original marked string can no longer be found when the formatting command is applied.

 

The code below performs the desired action correctly; the macro is preparing the text before calling FormatText.

sText = UpperCase('Monday')
sRESULT = FormatText(sText, 'COLOR(RED)', -1)

The result of a call must not be modified, but concatenation with other text is valid as shown in the example below.

sText = UpperCase('Monday')
sFormatted = FormatText(sText, 'COLOR(RED)', -1)
sRESULT = 'Day: ' + sFormatted

This above code now displays 'Day: MONDAY', with only MONDAY receiving the red formatting.

 


Topic 179730, last updated on 23-Nov-2026