Welcome to Q&A forum.
The following macro based on your sharing works normally on my test environment. I deleted some code, please check whether it is helpful to you.
Sub test()
If ActivePresentation.CreateVideoStatus <> ppMediaTaskStatusInProgress Then
ActivePresentation.CreateVideo FileName:=Environ("USERPROFILE") & "\Desktop\3.mp4", _
UseTimingsAndNarrations:=True, _
DefaultSlideDuration:=10, _
VertResolution:=1080, _
FramesPerSecond:=25, _
Quality:=100
End If
End Sub
(The username could not be changed.)
Besides, as the tag of "Office-powerpoint-itpro" focuses on general issue of PowerPoint client, as you have further issues of VBA, I will add the related tag "office-vba-dev".
Thanks for your understanding.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.