In this paper we discuss techniques for online generation of macro-actions as part of the planning process and demonstrate their use in a forward chaining search planning framework. The macroactions learnt are specifically created at places in the search space where the heuristic is not informative. We present results to show that using macro-actions generated during planning can improve planning performance