tell application "System Events"
    set powerPointProcessList to (every process whose name is "Microsoft PowerPoint")
end tell

-- Check if PowerPoint is running
if (count of powerPointProcessList) > 0 then
    tell application "Microsoft PowerPoint"
        -- Check if any files are open
        if (count of presentations) < 1 then
            error "Not open any presentation file" number 60002
        end if
    end tell
else
    error "PowerPoint not running" number 60001
end if