I understood from you that you want to have caption text size different for each vertical and horizontal shots.
The answer is you may use Conditional Action. See, record two actions, one for Portrait image orientation name it like "Portrait image caption" place your caption text, set font size and location, then stop recording, record a second action and name it something like "Landscape image caption" place your caption text, set font size and location, then stop recording.
Then create a third action, start recording, go to the Action's Panel fly-out menu and choose "Insert Conditional", from the small dialogue window below choose as shown to apply different text size and location on the photo as specified by both actions.
Thanks for the reply. Perhaps I have not expressed myself precisely enough. I want the font size of the caption to be the same as the image. In other words, if the picture caption is 60% of the (at a horizontal format picture) image width, then this should be the same for a portrait format (also 60% of the (at a vertical format picture) image width. So the caption should adapt dynamically to the respective width of the image. Is something like that possible?
I am not sure that I am fully following your post, but actions involving size often give better results with the rulers set to Percentage when the action is recorded.
Thanks for the posting.
A perhaps stupid question of mine: Does this also work in terms of the size of a text on a text plane? And if so how does it work?
Sorry I am not a very skilled PS CC 2017 user
Sorry: I did not see the link. I will try to find out how that works......