Can anyone help point me in the right direction here.
In the #Task application, I've selected "Options" and filled out a bunch of "Members". It's set to multiple selection so in the application I can select multiple file types to save to.
What I can't figure out, is how #Task passes these options to the macro. Is it a comma separated string, an array, or whatever?
I've tried to handle them as a string like this with no luck. They will export if I select one at a time. But when I select multiple, it will only save using one of the selected.
****************
Dim Extension As String
Extension = "%STR_Extension%"
'Index string to array
myArray = Split(Extension, ", ")
'Run for each extension selected
For Each i In myArray
myArray_Ext = i
myArray_Ext_Trim = Mid(myArray_Ext, Len(myArray_Ext) - 4, 4)
boolstatus = swModel.SaveAs3(FileLocation & "\" & NewFileName & myArray_Ext_Trim, 0, 0)
Next
****************
I also Tried like this as an array:
****************
Dim Extension As Variant
Extension = Array("%STR_Extension%")
myArray = Extension
'Run for each extension selected
For Each i In myArray
myArray_Ext = i
myArray_Ext_Trim = Mid(myArray_Ext, Len(myArray_Ext) - 4, 4)
boolstatus = swModel.SaveAs3(FileLocation & "\" & NewFileName & myArray_Ext_Trim, 0, 0)
Next
****************
Hi Derek,
The values are separated by commas. In order to find the macro which is resolved by #TASK (for debugging purposes) you can follow the steps below:
Specified folder must exist.
Next time when you run the macro you will see a text file created with the time stamp
You can copy-paste that into the VBA macro and debug. So for example for the following sts file:
with the following selection:
This what would be resolved:
As you can see the values are separated by commas.
Thanks,
Artem