From Adrian Roth:
Environment: WordPerfect 9.0.0.896
Windows XP Professional SP 3
When I try to use the following macro commands:
PrefLocationOfDocuments or
PrefLocationOfMacroFilesI get a ‘Parameter error’ message, regardless of the parameters specified. The parameter in error is not indicated. Is there something special about these commands, something that I should know?
Those commands are in the old style, where each command includes a set of brackets and options. I’ve had reliable results by ignoring them. Instead, go to the WordPerfect Macro Help file, and browse through the section of “Current WordPerfect System Variables”. I think you’ll use “?PathDocument” and “?PathMacros”, but there are also options for the supplemental folders for each of those settings.
These system variables are easy to use without parameters; this sample works in my code, to assign the current Graphics path to a variable named GPath:
GPath:=?PathGraphics

#1 by Adrian Roth on February 17th, 2010
| Quote
The reply that was posted assumed that I wanted to use the commands to interrogate the settings. However, according the Macro Help in Version 9 (which is what I have), I can use the commands to alter the settings, and that is what I wanted to do. Any help?
Adrian
#2 by Editor on February 18th, 2010
| Quote
Adrian–
Should be possible. How about posting the complete line of the macro containing the command that isn’t working?
#3 by Adrian Roth on February 20th, 2010
| Quote
Here are some that I have tried.
PrefLocationOfDocuments ( Path: “\\ROTHDESK\WordPerfect Documents”; UseDefExt:Yes!; UpdateQuickList: No!; UseExplorerStyleFileDialogs: No!; UseOrigFileFormat: Yes!;
UseODMAIntegration: No! )
PrefLocationOfMacroFiles ( MacroDir: “\\ROTHDESK\WordPerfect Macros”; MacroSupplDir: “C:\WordPerfect Macros”; UpdateQuickList:No! )
Any thoughts about these?
Adrian
#4 by Editor on February 20th, 2010
| Quote
Adrian–
I don’t have WP 9 installed to check, but this works in 10, and crashes in X4–it’s as created by the Macro Recorder, which is usually the simplest base statement set:
Application (WordPerfect; “WordPerfect”; Default!; “EN”)
PrefLocationOfDocuments (Path: “D:\S08\”)
PrefSave ()
A similar test works in both WP10 and X4 here for the macro folder, again, using the Macro recorder, and then seeing if what was recorded will play:
Application (WordPerfect; “WordPerfect”; Default!; “EN”)
PrefLocationOfMacroFiles(Path: “D:\”)
PrefSave()
I also tried a network address (\\unc-path\drive), and it made no difference; the recorded macro for file locations still crashes in X4, and still works in 10.
Worth checking: WP 9 looks like it should be version 9.0.0.664 or above:
http://www.corel.com/servlet/Satellite/us/en/Content/1153321224268?pid=1208716793655
Any time the code from the Macro Recorder won’t run on a very short test case like this, it’s clearly a bug, as the recorder has to match the compiler. As the recorder code matches between 10 & X4, I’d guess a bug in the compiler, and I don’t see an easy workaround.
Jerry Stern
Webmaster, http://www.pc410.com
#5 by Editor on February 20th, 2010
| Quote
Adrian–
Looks like this is a known problem over at WPUniverse:
http://www.wpuniverse.com/vb/showthread.php?postid=205707
There is nothing in the Corel knowledgebase mentioning these commands.
Jerry Stern
Webmaster, http://www.pc410.com
#6 by Adrian Roth on March 11th, 2010
| Quote
HI,
A solution to the problem: The macro processor would accept PrefLocationOfMacroFiles(“D:\”), but would not accept PrefLocationOfMacroFiles(“\\ROTHDESK\WordPerfect Macros”).
I mapped the macro folder to “Y:\” and the document folder to “X:\”, and now the PREF commands work perfectly.
Hallelujah!!!
Thanks to all,
Adrian