DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert Graphic to the Report via VBS

Hello,
 
I am trying to insert a graphic (*jpg) to the report via VBS-Script. I tried with following code:
 
Call GraphObjOpen("Metafile1")
  MTAFILENAME      = "C:\test.jpg"
  MtaPosX          =28
  MtaPosY          = 78.84
  MtaRelPos        = "r-bot."
  MtaWidth         = 6.86
  MtaHeight        =4
  MtaRatioAdapt    =0
  MtaBackColor     =""
  MtaBackRGB       =0
  MtaEmbedded      =0
Call GraphObjClose("Metafile1")
Call picupdate
 
I have 2 pages report. My problem is that the graphic appears on the second page not on the first page. doese anyone has an idea how to fix this problem?
 
thnx
 
0 Kudos
Message 1 of 5
(3,931 Views)
Hey
 
You will have to set the acitve sheet: 

Call GRAPHSHEETSHOW("Blatt 1")

0 Kudos
Message 2 of 5
(3,926 Views)
Christian is correct, but if you use an English version of DIAdem, the correct command is:

    Call GRAPHSHEETSHOW("Sheet 1")

unless you have changed the name of your sheets. If you have custom names, add the name of the sheet you are looking to edit between the " ".
Otmar D. Foehner
Message 3 of 5
(3,917 Views)
This is why copy and paste is so bad Smiley Wink
0 Kudos
Message 4 of 5
(3,910 Views)
thank you very much your quick answers.
0 Kudos
Message 5 of 5
(3,896 Views)