I've flown into Venice a few times to start a trip in Slovenia. You can get to Ljubljana as mentioned above by bus or transfer - look into DRD or GoOpti. FlixBus may have cheaper direct buses but perhaps not from the airport. If you want to add some time in Trieste, you can detour through there from Venice too (you can get from Venice to Ljubljana almost entirely by train via Trieste but you must connect from Trieste Centrale to Villa Opicina (or Sezana) near Trieste by bus...or take a train to Trieste, bus from there to Ljubljana.
On another trip, I flew into Munich and trained down through Salzburg and Graz to Maribor to explore eastern Slovenia a little - also gave me the opportunity to stop in Austria. In that case, the Munich flight was a lot cheaper than flying directly to Slovenia, which would have been faster, but the cost savings in effect paid for the extra days spend in Austria.
On trips ending in Croatia, I've flown out of Zagreb and Split back to western Europe before flying home. It helps if you don't mind spending a few nights in Paris or Amsterdam or something at the end and have the time. Sometimes it's possible to connect in the western European city on the same day, depending on your flight times, but some find that too risky. (I've done it but not from Croatia.)
I've checked all of these options for each trip - one isn't always the best. Depends in large part on the flight schedules at the time. For example, one year I had a frequent flyer ticket to Amsterdam and needed to get to Ljubljana. My incoming flight from the US to Amsterdam arrived just over an hour before a direct Adria flight to Ljubljana. I probably would have made it (as it turned out) but the layover was just too tight to risk it, so I took a Venice flight an hour later. Had the Adria flight left an hour later, I surely would have taken that instead and skipped Venice.