Louie,
Please see below for what we did and the results we got.
Renamed PDF file to ItemNumber.PDF
Created a .txt file called PDF Script and put in the script as follows:
Dim wsh
PDFPath="C:\Users\Mikes\Desktop"
PDFFile = ItemNumField & ".pdf"
set wsh = CreateObject("WScript.Shell")
Return = wsh.Run (PDFPath & PDFFile,1,False) Set wsh = Nothing
Via the customizer panel, I created a External Link Definition.
Main tab – Text: PDF
Bitmap: Button
Link Settings- Type: MS Script
Language: VBSScript – Visual Basic
File Name: C:\Users\Mikes\Desktop\PDF Script.txt
Execute Script on Client (testing this in a test company on my computer before trying on server)
Options - Default – Nothing Changed
Here is there error information I get when I click on the button in Inventory Inquiry.
MS Script Link Error Information
User... MAS200SERVER
Date... 10/16/2008
Time... 14:28:19
OLE Error Number... 1025
Description........ Expected end of statement
Language........... VBScript
Script Line........ 32
Script Column...... 45
Script Text........ Return = wsh.Run (PDFPath & PDFFile,1,False) Set wsh = Nothing
1 : '
2 : ' Sage MAS 200 system variables
3 : '
4 : MAS_SCR_CMP = "TOT"
5 : MAS_SCR_USR = "MikeS"
6 : MAS_SCR_MOD = "I/M"
7 : MAS_SCR_DTE = "20081016"
8 : MAS_SCR_HWD = "C:\accounting\best\mas90\home"
9 : MAS_SCR_LWD = "C:\accounting\best\mas90\MAS_TOT\imtot"
10 : MAS_SCR_LIB = "C:\accounting\best\mas90\IM\IMWIAA.LIB"
11 : MAS_SCR_PNL = "PNL_MAIN"
12 : MAS_SCR_OBJ = "BT_LINK_1"
13 : MAS_SCR_MSG = ""
14 : MAS_SCR_PFM = ""
15 : MAS_SCR_CS = 1
16 : MAS_SCR_DBG = 0
17 : MAS_SCR_ERR = 0
18 : '
19 : ' form variables passed in by Customizer
20 : '
21 : '
22 : ' language : VBScript
23 : ' file name : c:\users\mikes\desktop\pdf script.txt
24 : ' script begin
25 : '
26 : Dim wsh
27 : PDFPath="C:\Users\Mikes\Desktop"
28 :
29 : PDFFile = ItemNumField & ".pdf"
30 :
31 : set wsh = CreateObject("WScript.Shell")
32 : Return = wsh.Run (PDFPath & PDFFile,1,False) Set wsh = Nothing
33 :
34 :
35 :
36 :
37 : '
38 : ' script end
39 : '
Please see below for what we did and the results we got.
Renamed PDF file to ItemNumber.PDF
Created a .txt file called PDF Script and put in the script as follows:
Dim wsh
PDFPath="C:\Users\Mikes\Desktop"
PDFFile = ItemNumField & ".pdf"
set wsh = CreateObject("WScript.Shell")
Return = wsh.Run (PDFPath & PDFFile,1,False) Set wsh = Nothing
Via the customizer panel, I created a External Link Definition.
Main tab – Text: PDF
Bitmap: Button
Link Settings- Type: MS Script
Language: VBSScript – Visual Basic
File Name: C:\Users\Mikes\Desktop\PDF Script.txt
Execute Script on Client (testing this in a test company on my computer before trying on server)
Options - Default – Nothing Changed
Here is there error information I get when I click on the button in Inventory Inquiry.
MS Script Link Error Information
User... MAS200SERVER
Date... 10/16/2008
Time... 14:28:19
OLE Error Number... 1025
Description........ Expected end of statement
Language........... VBScript
Script Line........ 32
Script Column...... 45
Script Text........ Return = wsh.Run (PDFPath & PDFFile,1,False) Set wsh = Nothing
1 : '
2 : ' Sage MAS 200 system variables
3 : '
4 : MAS_SCR_CMP = "TOT"
5 : MAS_SCR_USR = "MikeS"
6 : MAS_SCR_MOD = "I/M"
7 : MAS_SCR_DTE = "20081016"
8 : MAS_SCR_HWD = "C:\accounting\best\mas90\home"
9 : MAS_SCR_LWD = "C:\accounting\best\mas90\MAS_TOT\imtot"
10 : MAS_SCR_LIB = "C:\accounting\best\mas90\IM\IMWIAA.LIB"
11 : MAS_SCR_PNL = "PNL_MAIN"
12 : MAS_SCR_OBJ = "BT_LINK_1"
13 : MAS_SCR_MSG = ""
14 : MAS_SCR_PFM = ""
15 : MAS_SCR_CS = 1
16 : MAS_SCR_DBG = 0
17 : MAS_SCR_ERR = 0
18 : '
19 : ' form variables passed in by Customizer
20 : '
21 : '
22 : ' language : VBScript
23 : ' file name : c:\users\mikes\desktop\pdf script.txt
24 : ' script begin
25 : '
26 : Dim wsh
27 : PDFPath="C:\Users\Mikes\Desktop"
28 :
29 : PDFFile = ItemNumField & ".pdf"
30 :
31 : set wsh = CreateObject("WScript.Shell")
32 : Return = wsh.Run (PDFPath & PDFFile,1,False) Set wsh = Nothing
33 :
34 :
35 :
36 :
37 : '
38 : ' script end
39 : '