We present a numerical method for finding and continuing heteroclinic connections of vector fields that involve periodic orbits. Specifically, we concentrate on the case of a codimension-d heteroclinic connection from a saddle equilibrium to a saddle periodic orbit, denoted EtoP connection for short. By employing a Lin's method approach we construct a boundary value problem that has as its solution two orbit segments, one from the equilibrium to a suitable section Σ and the other from Σ to the periodic orbit. The difference between their two end points in Σ can be chosen in a d-dimensional subspace, and this gives rise to d well-defined test functions that are called the Lin gaps. A connecting orbit can be found in a systematic way by closing the Lin gaps one by one in d consecutive continuation runs. Indeed, any common zero of the Lin gaps corresponds to an EtoP connection, which can then be continued in system parameters. The performance of our method is demonstrated with a number of examples. Specifically, we computate different types of EtoP orbits in the Lorenz system, in a vector-field model of a saddle-node Hopf bifurcation with global reinjection and in a four-dimensional Duffing-type system. Finally, we demonstrate the versatility of our geometric approach by finding a codimension-zero heteroclinic connection between two saddle periodic orbits in a four-dimensional vector field.