Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have cross table and liste selection date, i need to create macros that turn over the liste select , and in each value , export this cross table as qvd file with one selection for this liste
it s possible?
Doesn't val.Item(i).Text give you a different name?
Maybe:
obj.ExportEx "C:\Users\04488\Desktop\Vision\straight(" & val.Item(i).Text & ").qvd",4
This code from the API cycles through the possible values in a field:
set val=ActiveDocument.Fields("Month").GetPossibleValues
for i=0 to val.Count-1
msgbox(val.Item(i).Text) ' change this line to select each value
' Add code here to store to qvd
next
HELLO M W,
how to select the object tablecross ??
ActiveDocument.GetSheetObject( ref) , i knowed this funtion but how to store the table with the selection item
This is also from the API Guide:
set cs = ActiveDocument.GetSheetObject("CS03")
cs.ServerSideExportEx "C:\test.html" , ";" , 0 '0=HTML, 1=Text, 2=Bitmap, 3=XML, 4=QVD, 5=BIFF
set val=ActiveDocument.Fields("Date").GetPossibleValues
for i=0 to val.Count-1
set cs = ActiveDocument.GetSheetObject("ch10")
cs.ServerSideExportEx "nomfichier.qvd"
next
but with th store i need to store table with for each selection values possible , as if i selecte value of selection date and i stored the table , and after that the next value and i stored
I assume that means you will want a different name for each qvd?
I want to automate a task, I have a table, for the set of value of the selection date: I select a date and I export the table as qvd, I need to automate the task, export the table as many value of the selection, each time I select the date and I export
set val=ActiveDocument.Fields("AGENCE").GetPossibleValues
for i=0 to val.Count-1
ActiveDocument.Fields("AGENCE").Select (val.Item(i).Text)
set obj = ActiveDocument.GetSheetObject("CH02")
obj.ExportEx "C:\Users\04488\Desktop\Vision\straight(val.Item(i).Text).qvd",4
next
this script working but i need different name for each qvd
Doesn't val.Item(i).Text give you a different name?
Maybe:
obj.ExportEx "C:\Users\04488\Desktop\Vision\straight(" & val.Item(i).Text & ").qvd",4