paul Posted March 19, 2009 Report Share Posted March 19, 2009 I have the simplest macro which I'm trying to run from a variable. Here's the one-line macro" Text Box Display: abc (a header of abc, the contents of def) Here's its Direct Editor representation: <TEXT BOX DISPLAY Title="abc" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang3081{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 def\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> But placing this in T[1], then running the macro in T[1], results in a text box with a header of abc and contents of tf1nsinsicpg1252eff0eflang3081onttbl0nilcharset0 Tahoma;1nil Tahoma;iewkind4c1ard0s16 def1 ar ??? BTW, the example in the help file talks about separator characters, then goes on to provide an example which seems entirely lacking in said separator characters! Any ideas please? Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 19, 2009 Report Share Posted March 19, 2009 I have the simplest macro which I'm trying to run from a variable. Here's the one-line macro" Text Box Display: abc (a header of abc, the contents of def) Here's its Direct Editor representation: <TEXT BOX DISPLAY Title="abc" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang3081{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 def\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> But placing this in T[1], then running the macro in T[1], results in a text box with a header of abc and contents of tf1nsinsicpg1252eff0eflang3081onttbl0nilcharset0 Tahoma;1nil Tahoma;iewkind4c1ard0s16 def1 ar ??? BTW, the example in the help file talks about separator characters, then goes on to provide an example which seems entirely lacking in said separator characters! Any ideas please? I bet it will come down to the syntax of the commands you've used, particularly the Run Macro in Variable, but you haven't posted that. Edit: As I suspected, the code needs an obscure change to this: <TEXT BOX DISPLAY Title="abc" Content="{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\deff0\\\\deflang3081{\\\\fonttbl{\\\\f0\\\\fnil\\\\fcharset0 Tahoma;}{\\\\f1\\\\fnil Tahoma;}}\\r\\n\\\\viewkind4\\\\uc1\\\\pard\\\\f0\\\\fs16 def\\\\f1 \\r\\n\\\\par }\\r\\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\\x00" Delay="0"/> The macro then produces the correct result. Unfortunately the Help is a bit thin, so this was largely a matter of trial/error. After reading the table under: This table shows several other substitutions for characters that cannot be added directly to a macro command: I tried (amongst many other things!) changing all instances of '\' to '\\', which happily gave the proper result. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
paul Posted March 19, 2009 Author Report Share Posted March 19, 2009 Good catch! I read the extremely sparse documentation on this and concluded that I didn't need to do this - another wrong decision <g>! Quote Link to comment Share on other sites More sharing options...
kevin Posted March 19, 2009 Report Share Posted March 19, 2009 We will update the help topic for the Run Macro in Variable to make it clearer. This has been assigned the tracking number [iSS6737]. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.