Will this work for you?
(defun c:sample ( / OpenDwgs eachDwg)
(setq OpenDwgs (vla-get-documents (vlax-get-acad-object)))
(vlax-for eachDwg OpenDwgs
(do_some_stuff)
) ;_ end vlax-for
) ;_ end defun
/it's early in the morning, I haven't had my coffee, and I haven't actually tested the above for correctness but I'm pretty sure it's what you're after