K
Kristian
Hello,
I'm trying to write code to create distribution lists.
I want to be able to choose what to create a DL from so I
have a small form that lets the user choose some
parameters. All parameters are user defined:
[ContResp] = Contact responsible
[EngInfo] = The contact prefers info in English
[Camp] = A marketing campaign
So,if he wants, the user can create a DL
for all contacts of a chosen campaign,
for all contacts of one employee (Contact responsible),
for all contacts that prefer Swedish or English,
or a combination of these.
It seemed easy enough, but I can't get the Restrict (and
not the Find/FindNext method(s) to work.
Not working 1:
Set oSvItms = _
oItms.Restrict("[UserProperties(""EngInfo"")] = 'False'")
Not working 2:
Set oSvItms = _
oItms.Restrict("[EngInfo] = 'False'")
Although it seems to be "on the right track";
No matter what value i put inside the filter condition,
the resulting collection always returns five items
(which is the number of English preferring contacts)...
Not working 3:
Set itm = oItms.Find("[EngInfo]=Falskt")
Do Until TypeName(itm) = "Nothing"
Set SvItem = oSvItms.Add
Set SvItem = itm
Set itm = oItms.FindNext
Loop
?oSvItms.Count in the immediate window returns 0...
I would appreciate any help,
TiA,
Kristian
I'm trying to write code to create distribution lists.
I want to be able to choose what to create a DL from so I
have a small form that lets the user choose some
parameters. All parameters are user defined:
[ContResp] = Contact responsible
[EngInfo] = The contact prefers info in English
[Camp] = A marketing campaign
So,if he wants, the user can create a DL
for all contacts of a chosen campaign,
for all contacts of one employee (Contact responsible),
for all contacts that prefer Swedish or English,
or a combination of these.
It seemed easy enough, but I can't get the Restrict (and
not the Find/FindNext method(s) to work.
Not working 1:
Set oSvItms = _
oItms.Restrict("[UserProperties(""EngInfo"")] = 'False'")
Not working 2:
Set oSvItms = _
oItms.Restrict("[EngInfo] = 'False'")
Although it seems to be "on the right track";
No matter what value i put inside the filter condition,
the resulting collection always returns five items
(which is the number of English preferring contacts)...
Not working 3:
Set itm = oItms.Find("[EngInfo]=Falskt")
Do Until TypeName(itm) = "Nothing"
Set SvItem = oSvItms.Add
Set SvItem = itm
Set itm = oItms.FindNext
Loop
?oSvItms.Count in the immediate window returns 0...
I would appreciate any help,
TiA,
Kristian