Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does item_send function not work

Status
Not open for further replies.

tekkyun

Technical User
Oct 23, 2003
122
GB
As you can gather from subject title, I'm new to vbscript in outlook so I'm sure this question is simple!
A couple of days ago, I generated a form with function that opened access database when the user pressed the send button. The database then queries the outlook form data and updates a data table.
It was working fine, now for some reason the function doesn't work and the database isn't triggered. What might have changed to stop it working?

function as follows...
Function Item_Send()
set WshShell = CreateObject("WScript.Shell")
wshshell.Run """D:\Program Files\Microsoft Office\Office\msaccess.exe""H:\HolidayBooker\HolidayBookerData.MDB", 2, false

End Function

 
[tt]wshshell.Run """D:\Program Files\Microsoft Office\Office\msaccess.exe""[highlight] [/highlight]H:\HolidayBooker\HolidayBookerData.MDB", 2, false[/tt]
 
Tsuji,
Not sure what you mean. I tried copying and pasting your code to replace mine, but it makes no difference.
 
>Not sure what you mean
Would an argument be positing right by not separating with the executable by a space or more?
 
[tt]...exe""[highlight] [/highlight]H:\Hol...[/tt]
 
Tsuji,
I've left space where you suggest. The function still doesn't run. Could there be another reason?
 
Sussed it. I was working on another instance of the form without the code in it!.....well I did say I was new to this!
Thanks for your help tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top