I can't say I've never done this, but if your connection is subject to being flexed at all, romex being made of solid conductors will eventually break.
Romex is designed to be put in place and not moved around, hence all the code rules on staples, etc. Cords, on the other hand, being stranded wire, are designed to be moved to a certain extent, depending on design.