Options

Export the picture into Excel

juhos1juhos1 Member Posts: 5
Hi,
I need help with export the picture from Navision (table: 79 "Company information", field: Picture) into Excel ????

Thanks.

Comments

  • Options
    WaldoWaldo Member Posts: 3,412
    Well, I did it in Word, may be this can help you a bit. Here is some code:

    IF ISCLEAR(wrdApp) THEN
      CREATE(wrdApp);
    
    wrdDoc := wrdApp.Documents.Add;
    wrdSel := wrdApp.Selection;
    
    recCompanyInfo.GET;
    recCompanyInfo.CALCFIELDS(Picture);
    IF recCompanyInfo.Picture.HASVALUE THEN BEGIN
      ltxtLogoPath := ENVIRON('TEMP') + '\logo.bmp';
      recCompanyInfo.Picture.EXPORT(ltxtLogoPath,FALSE);
      wrdSel.InlineShapes.AddPicture(ltxtLogoPath);
    END;
    

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
Sign In or Register to comment.