Sub Insert Picture ()'Resize the cell to fit the picture size feature Insert ID Photo print-front in cell D6 reverse cell D10ActiveSheet.Pictures.Delete ' Cleanup expired photos range ("d6"). SelectDim AAAA= ActiveSheet.Range ("J1"). Value'J1 value of the active table = photo (positive) pathActiveSheet.Pictures.Insert (AA). SelectDim sh as Shape for each sh in activesheet.shapes sh. Lockaspectratio=False Sh. Left=Sh. Topleftcell.left Sh. Top=Sh. Topleftcell.top Sh. Width=Sh. Topleftcell.width Sh. Height=Sh. Topleftcell.height Next shcall chaend subsub Cha () Range ("D10"). Select Dim AAAA= ActiveSheet.Range ("J2"). Value'J2 value of the active table = photo (reverse) pathActiveSheet.Pictures.Insert (AA). Select'A . jpg image with the name of the cell in the directory where the current file is locatedDim sh as Shape for each sh in activesheet.shapes sh. Lockaspectratio=False Sh. Left=Sh. Topleftcell.left Sh. Top=Sh. Topleftcell.top Sh. Width=Sh. Topleftcell.width Sh. Height=Sh. Topleftcell.height Next sh End Sub
function Insert ID Photo print-front in cell D6 reverse cell D10
Vba,excel, ID, photo