Skip to main content

I want to insert Images into an EXCEL Worksheet from an NETEXPRESS 5.1 program.

I found the instruction ActiveSheet.Pictures.Insert (C:\\Users.MyPicture.JPG").select  but this is for othes languages

But which ist the equivalent series of INVOKES in an Netexpress 5.1 program.

Is there an demo or tutorial?

Thanks for any help.

I want to insert Images into an EXCEL Worksheet from an NETEXPRESS 5.1 program.

I found the instruction ActiveSheet.Pictures.Insert (C:\\Users.MyPicture.JPG").select  but this is for othes languages

But which ist the equivalent series of INVOKES in an Netexpress 5.1 program.

Is there an demo or tutorial?

Thanks for any help.

As I am not sure if using Excel or Word, does anybody know the procedure to insert images in Word? I have programs that c reate Word documents, but without pictures.
Thanks for any help.

I want to insert Images into an EXCEL Worksheet from an NETEXPRESS 5.1 program.

I found the instruction ActiveSheet.Pictures.Insert (C:\\Users.MyPicture.JPG").select  but this is for othes languages

But which ist the equivalent series of INVOKES in an Netexpress 5.1 program.

Is there an demo or tutorial?

Thanks for any help.

As I am not sure if using Excel or Word, does anybody know the procedure to insert images in Word? I have programs that c reate Word documents, but without pictures.
Thanks for any help.

I want to insert Images into an EXCEL Worksheet from an NETEXPRESS 5.1 program.

I found the instruction ActiveSheet.Pictures.Insert (C:\\Users.MyPicture.JPG").select  but this is for othes languages

But which ist the equivalent series of INVOKES in an Netexpress 5.1 program.

Is there an demo or tutorial?

Thanks for any help.

Here is an example of how to use this object and method in Excel from a NX program:

 

      $set ooctrl( P)
       class-control.
           MSExcel is class "$OLE$Excel.Application".

       working-storage section.
       01 ExcelObject          object reference.
       01 WorkBooksCollection  object reference.
       01 WorkBook             object reference.
       01 Activesheet          object reference.
       01 Pictures             object reference.

       procedure division.
      *>   Create a new instance of Microsoft Excel
           invoke MSExcel "new" returning ExcelObject

      *>   Make Excel visible
           invoke ExcelObject "setVisible" using by value 1

      *>   Get the collection of WorkBooks
           invoke ExcelObject "getWorkBooks"
               returning WorkBooksCollection

      *>   Add a new WorkBook to the collection
           invoke WorkBooksCollection "Add"
               returning WorkBook
           invoke ExcelObject "getActiveSheet" returning Activesheet
           invoke Activesheet "getPictures" returning Pictures
           invoke Pictures "Insert" using
               z"C:\\temp\\mypic.jpg"

      *>   Close the WorkBook, discarding the contents
           invoke WorkBook "Close" using by value 0

      *>   Finalize all objects
           invoke pictures "finalize" returning pictures
           invoke ActiveSheet "finalize" returning ActiveSheet
           invoke WorkBook "finalize" returning WorkBook
           invoke WorkBooksCollection "finalize"
               returning WorkBooksCollection

      *>   Exit Excel
           invoke ExcelObject "Quit"
           invoke ExcelObject "Finalize" returning ExcelObject

           stop run.



I want to insert Images into an EXCEL Worksheet from an NETEXPRESS 5.1 program.

I found the instruction ActiveSheet.Pictures.Insert (C:\\Users.MyPicture.JPG").select  but this is for othes languages

But which ist the equivalent series of INVOKES in an Netexpress 5.1 program.

Is there an demo or tutorial?

Thanks for any help.

Thank you, it works perfect.