I would put it this way: if you find the virus in RAM, then it's too late. It means that the virus is already active and may have caused damage. So, it's important to detect the virus before it actually unpacks to memory and starts.
There are many executable packers that make it possible to compress executable files as described. To detect malware in a packed executable file, the antivirus has to
1. be able to unpack this kind of packer, i.e. "see" inside of the archive
or
2. have the signature of the packed file in its virus database.
Recently (in avast! 4.1), the most common packers - mainly UPX and AsPack - are supported. It means that avast! is able to look inside the archives. Therefore, it should be able to detect malware packed this way.
However, to keep even the older versions of avast! updated, even the signatures of the packed versions are added to the virus database - if they really spread in this form. So, avast! should be able to detect In-The-Wild variants of malware, no matter what it's packed with (and no matter if you have scanning of archives switched on or off).
From this point of view, the mentioned test is questionable - you can pack a virus file with a rare packer and get a file that the antivirus won't be able to detect. However, this is "your variant" of the malware - not the one present in the wild and threatening the people (unless you spread your new variant to public, of course). Sure, the support for various packer makes it possible to detect new "variants" of older malware earlier, before the virus database is updated with the newly packed ones.
If I should return to the original question - whether avast! would detect the malware in RAM (when it does't find it in files) - I must say I don't know. Btw, most of the antiviruses today don't scan RAM at all - they say they are scanning memory, but they are actually scanning the corresponding files instead. You can make avast! scan the real memory (by creating a special new task from the Enhanced User Interface and selecting "Memory" as the area to scan) - and avast! may be able to detect the unpacked variants - but as I said, it's too late in fact.
As for the OLE objects - the problem is quite similar. There is no difference between scanning the files "on demand" and scanning them when the document is opened. In both times, the file is scanned - before the Office application is allowed access. If you would wait until the document is loaded into the application - it's too late again.