Not that I'm aware of. What I'd typically do is place the switch inside the loop. Something like this:
DECLARE @Partitions TABLE (PartitionId int PRIMARY KEY CLUSTERED);
DECLARE @PartitionId INT;
INSERT @Partitions(PartitionId)
SELECT
prv.boundary_id PartitionId
FROM sys.partition_functions AS pf
INNER JOIN sys.partition_range_values prv ON prv.function_id=pf.function_id
WHERE (pf.name=N'PartitionFunctionName');
WHILE EXISTS (SELECT NULL FROM @Partitions)
BEGIN
SELECT TOP 1 @PartitionId = PartitionId FROM @Partitions;
ALTER TABLE MS_PROD SWITCH PARTITION @PartitionId TO MS_Stage PARTITION @PartitionId;
RAISERROR('Switched PartitionId %d to Stage',0,1,@PartitionId) WITH NOWAIT;
DELETE @Partitions WHERE PartitionId = @PartitionId;
END