Hi,

I have a Kixform running which maps a network drive and I want it to open up a word document, the form works, the drive maps, however the doc won't open, I think there is something not right with the run "g:\test.doc", can anyone help?

Cheers

Break On
$System = CreateObject("Kixtart.System")
;create form
$Form = $System.Form()
$Form.BackColor = 212,208,200
$Form.FontSize = 8,25
$Form.Height = 187
$Form.Left = 200
$Form.Text = "Documentation Tool"
$Form.Top = 110
$Form.Width = 275

;create pulldown menu
$ComboBox = $Form.Controls.ComboBox()
$ComboBox.DropDownWidth = 121
$ComboBox.FontSize = 8,25
$ComboBox.Height = 21
$ComboBox.Left = 50
$ComboBox.Sorted = "False"
$ComboBox.Text = "Select Document"
$ComboBox.Top = 60
$ComboBox.Width = 148
$ComboBox.AddItem ("EPC - With Kerridge DMS")

;create button
$Button = $Form.Controls.Button()
$Button.FontSize = 8,25
$Button.Height = 30
$Button.Left = 50
$Button.Text = "Map Document Drive G:"
$Button.Top = 20
$Button.Width = 110
$Button.OnClick = "Button_Map()"

;create button
$Button = $Form.Controls.Button()
$Button.FontSize = 8,25
$Button.Height = 28
$Button.Left = 50
$Button.Text = "Open Document"
$Button.Top = 100
$Button.Width = 110
$Button.OnClick = "Button_Open()"


$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents())
Loop
Exit 1

Function Button_Click()
$app = $comboBox.text
Select
Case $app = "Select Document"
$rc = MessageBox("No Doc Selected.","Error",16,0)
EndSelect
Endfunction

Function Button_Open()
$app = $comboBox.text
Select

Case $app = "EPC - With Kerridge DMS"
Run "g:\test.doc"

EndSelect
Endfunction



$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents())
Loop
Exit 1
;
Function Button_Map()
Use g: '\\szgb06\company\Dealers\Documents'
EndFunction