extend line to intersect

Hi there.

Is there a way to extend a line to intersect with another? As you can see in this picture, the red lines ends before it intersects (connects) to the black line.

I'm looking for something, which "searches" in a specific distance, f.e. 1 mm, for other lines. A work-around would be to extrapolate the line for the distance and cut the part, which is beyond an intersected line...

What do you think?


Edit: These are imported lines. I'm looking for a scripted solution (VBA).