ImageList imageList = new ImageList(); List<String> textList = new List<String>(); int i = MacroAPI.GetHistoryItemCount(); String textItem; while(i>=0){ // get the text (image may have a name); if(MacroAPI.GetHistoryText(i, out textItem)){ textList.Add(textItem); } // also check if it is an image; Image image; if(MacroAPI.GetHistoryImage(i, out image) && image!=null){ imageList.Images.Add(image); } i--; }