Hi Friends ,
In my application i am using macro to create csv files.But some filtering is there , i need to create filtered data to csv files.
for eg.,
AccountNum
| Name
| Location
|
---|
0 | xxxx | chennai |
0 | yyy | hyderabad |
1111 | abcd | bangalore |
1112 | efgh | mumbai |
1113 | ijkl | pune |
1114 | mnop | kerala |
0 | rstvu | mysore |
- | wxyz | america |
my filtering is based on Accountnum
my expression is if(Accountnum >0 , Accountnum) , i need to create the filtered data as csv files
i am using the macro like this:
Can u pls tell me where should i modify
SUB AdHocExport
confirmation = MSGBOX ("Ad hoc CSV export has been initiated." & vbCrLf & "Do you wish to continue?"& vbCrLf &"", 36, "Export Confirmation")
IF confirmation = 7 THEN
EXIT SUB
END IF
INT FileName
INT var
INT fname
SET f= ActiveDocument.Variables("vfname")
fname = f.GetContent.STRING
SET v = ActiveDocument.Variables("vMacroChartId")
var = v.GetContent.STRING
ActiveDocument.Fields(fname).Clear
SET Doc = ActiveDocument
SET Field = Doc.Fields(accnum).GetPossibleValues
FOR i=0 to Field.Count-1
Doc.Fields(fname).Clear
Doc.FIelds(fname).SELECT Field.Item(i).Text
Doc.GetApplication.WaitForIdle
FileName = Field.Item(i).Text & ".csv"
Doc.GetSheetObject(var).Export FileName, ","
NEXT
Doc.Fields(fname).Clear
MSGBOX "Ad hoc CSV export is complete!",64,"Task Completion Notification"
END SUB
Thanks in Advance