Thread: ExpandMacrosEx
View Single Post
  #1  
Old 03-05-2004, 01:51 PM
perkincr perkincr is online now
Registered User
 
Join Date: 03-05-2004
Posts: 2
ExpandMacrosEx

I am using the ExpandMacrosEx method in a script running in the GUI. I use the following code:

Application.ExpandMacrosEx(%VAR%, vbldUndefLeave, strResult, False)

Even though I use the vbldUndefLeave as the undefTreatment parameter, the 'Enter Undefined Macro Value' dialog still appears.

I would think that the result should be that the strResult should contain the unexpanded macro if it is not defined.

----------
The above was an attempt to work around the original purpose of this script. I want to write to a file the contents of a variable %VAR% that contains text with special characters such as '%' and '['.

Is there a way to write to a file the literal text without variable expansion? I even tried to replace the '%' with '%%' in the variables. But when attempting the replace the '%' character is still being evaluated as a macro.

Help on either of these issues would be appreciated.
Reply With Quote