excel pictures

alikzanderalikzander Member Posts: 11
edited 2002-02-08 in Navision Financials
Somebody knows how i can to attach a picture in Excel from Navision.
Thanks!!!

Comments

  • wonmowonmo Member Posts: 139
    I know of one way that you could do this.

    Assuming that you have the picture in a BLOB field you have to export it to a location on your hard drive. Afterwards, after creating an instance of Excel through automation and assigning a variable to the Excel Automation server of class Sheet which is assigned as the ActiveSheet add this line of code:


    xlSheet.Shapes.AddPicture(FilePathAndName, 1, 1, 20, 20, 100, 100);

    After the path and filename, the 1 links the image to the file, the next 1 will set SaveWithDocument to TRUE, the next 2 integers are for position (in points) and the final 2 integers are for size (in points). Hope this helps.
Sign In or Register to comment.