Count by Cases:
Case 1: abc and bcd are both divisible by 17:
abc0-bcd is divisible by 17. a000-d is divisble by 17. Since 1000 = -3 (mod 17), we get 3a+d = 0 (mod 17).
a=3 and d=8.
bc8 is 17 times x4, where x = 0, 1, 2, 3, 4, 5.
Note that b and c cannot be 0. I found solutions 35782, 37483, 39187 and 39184.
There are 4 solutions in this case.
Case 2: abc and bcd are both divisible by 23:
a000-d is divisble by 23. Since 1000 = -12 (mod 23), we get 12a+d = 0 (mod 23).
No solution in this case
It is tedious to work out all cases.