

Reference a content control Sometimes, you want to repeat information from the body of the document in the header or footer. And immediately saved the document (as I had been doing to prevent from losing too much work) - and VOILA!!!ĭoing so will impact the entire document, so don't change the style if you want to change the format for a single section. So I had to then reinsert/retype in the header details. Then on CHECK FOR ISSUES - INSPECT document - and after the run, then removed the header and xml features. In the problem document I clicked on FILE. This morning I finally got so sick & tired of it. Image: © Dzmitry Kliapitski - Shutterstock.Over time I did determine that the crashes happened more often (98%) when clicking the header - every document with a header, not others. MsgBox "Unable to Find Photo" 'Shows message box if picture not found Picname = Cells(lThisRow, 2) 'This is the picture nameĪ("C:\Users\vbayat\My Documents\vidabayat\re-market\" & picname & ".jpg").Select 'Path to where pictures are stored 'picname = Range("B6") 'This is the picture name 'Range("A6").Select 'This is where picture will be insertedĬells(pasteAt, 1).Select 'This is where picture will be inserted Now, enter the following code: Sub Picture() In order to use a macro to insert pictures, you must begin with the following assumptions: picture names are found in col B starting at B2 you want to paste each picture at different location where to paste the picture identified in col B is found in col C starting at C2.

This FAQ will walk you through the steps to applying this macro to your spreadsheet in order to have pictures appear. In order to write an effective macro to insert images in excel, you will need to use a loop. Macros in Excel can perform functions like inserting pictures, copying data from one cell to another, etc.
