Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
ActiveDocument.Fields("Contract_Partner").GetPossibleValues don't return all values which are displayed in the list box.
When I call the missing value ActiveDocument.Fields("Contract_Partner").Select "foobar", the exports works well.
Any hints?
Thanks for your time!
cheers
Martin
<snip>
ActiveDocument.ClearAll true
set val=ActiveDocument.Fields("Contract_Partner").GetPossibleValues
for i=0 to val.Count-1
msgbox(val.Item(i).Text)
set MyTable = ActiveDocument.GetSheetObject("CH918")
ActiveDocument.Fields("Contract_Partner").Select val.Item(i).Text
MyTable.ExportBiff "C:\" & val.Item(i).Text &"_export" & ".xls"
next
</snip>
Hi Martin, What is the purpose on this Macro first.
Try to create your app without Macro for better performance and future versions upgrades.
Maybe you changed:
set val=ActiveDocument.Fields("Contract_Partner").GetPossibleValues
to
set val=ActiveDocument.GetSheetObject("LB09").GetPossibleValues
- Marcus
Hi,
I think it's can be because the limitation. Like they talk here.
This can Also help you.