Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following simple button macro below, but the first line fails with the error
>>> Object required: 'ActiveDocument.Fields(...)'
Any idea on how to pass the utelimsi parameter to my IE launch command?
Note that the button only becomes active when a single distinct IMSI is selected.
Many Thanks
Sandy
sub UTEL
set utelimsi = ActiveDocument.Fields("IMSI").GetSelectedValues
set WshShell = CreateObject("WScript.Shell")
WshShell.Run "iexplore.exe http://10.0.1.98/cgi-bin/uqos/tcapsearch.pl??Action=Search&Category=TCAP&From_Date=2009.12.07&From_Time=05:00&To_Date=2009.12.07&To_Time=06:00&Field=imsi&Operator=&Value=&bind1=and&Sub=&bind2=and&Expression=((imsi="&utelimsi.item(0)&"))&Button=View",3,true
end sub
You need to extract the text string from that object containing an array.
After the set utelimsi... statement do this:
utelimsi_txt = utelimsi.Item(0).Text
and then use utelimsi, which now contains simple text, as you build your command line.
Thanks Tim,
even after adding the 0 array line it still fails at the same line just before?
I am using v8.
Cheers
Sandy