Your example suggests you are using the report generation tool kit. Then you have to add _Word Dynamic Vis.vi from _wordrdsub.llb and _Excel Dynamic VIs.vi from _exclsub.llb
as dynamic VIs on the source files Tab when you build the application You find these on Labview directory\vi.lib\addons|_office\