Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more: , +
Hi all,

I'm trying to write a replacement function in C# for Corel WordPerfect;
C#
WordPerfect.PerfectScript objWordPerfect = new WordPerfect.PerfectScript();
objWordPerfect.PosDocVeryTop();
objWordPerfect.SearchString(StrgToLookFor:original);
objWordPerfect.ReplaceString(RplcStrg:change);
objWordPerfect.SearchCaseSensitive(_SearchCaseSensitive_State_enum.No_SearchCaseSensitive_State);
objWordPerfect.ReplaceAll(_ReplaceAll_SearchMode_enum.Extended_ReplaceAll_SearchMode);

It works well but i need to use special format WP codes also, i want it to realize this operation,
C#
StrgToLookFor:apple

RplcStrg:[Indent][LeftTab]sour[LeftTab]apple[Indent]

I cannot make it, because these codes([Indent] etc.) are special formatted for Wordperfect, can someone tell me how can i use all these codes in my function? I try to call Wordperfect macro from outside with my function with;
C#
objWordPerfect.MacroFilePlay(mpath);


I can pass string to macro but only plain strings not special formatted codes.Is there a way?

I would appreciate it if anyone helps me.

Thanks
Posted
Updated 27-Sep-11 0:35am
v5

1 solution

You may want to check this out if you haven't already.
Wordperfect Community Forum[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900