if you have a history of visa avoid fly OUT/IN. You can go Penang by flight and come back by land. Of go KL and fly in via CM where Immigration might not be as strict.
David Broadfoot the story is 4 weeks old. i believe op moved on and not keen to disclose this info. i found it strange that a person in denied entry with just one tourist in passport.
looking at your profile you are a member since 2017, posted many time about border run to Mae Sai and now asking if you cn do a visa application in Vientiane. The answer is yes. Book your appointment on
*************************
and for further info have a look at the Royal Thai Embassy web site.