We study two generalizations of fractional variational problems by considering higher-order derivatives and a state time delay. We prove a higher-order integration by parts formula involving a Caputo fractional derivative of variable order and we establish several necessary optimality conditions for functionals containing a combined Caputo derivative of variable fractional order. Because the endpoint is considered to be free, we also deduce associated transversality conditions. In the end, we co...