Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I batch the existing scripting in WithClass from VBA?

0
Posted

How do I batch the existing scripting in WithClass from VBA?

0

You can actually run WithClass’s internal scripting at the class level using the VBA Macro property RunClassScript. You just need to pass the class object, the name of the script and the extension you wish to tagonto the final file output name. For example RunClassScript(CurrentClass.Name,”vcfunc0.sct”, “.cpp”) would generate foo.cpp using The vcfunc0.sct scriptif the CurrentClass.Name is foo. Below is an example that cycles through all classes using the vcfunc0.sct script: Dim ClassList As With_Class.Classes Dim CurrentClass As With_Class.Class; Dim iCount As Integer Dim j As Integer Dim strScriptDir As String strScriptDir = “c:\program files\wc98\scripts\” Set ClassList = wcDocument.Classes iCount = ClassList.Count For j = 1 to iCount Set CurrentClass = ClassList.Item(j) wcDocument.RunClassScript(CurrentClass.Name, strScriptDir + “vcfunc0.sct”,”*.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.