Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

[RESOLVED] New to VBScript - VS 2022 for editing/debug

$
0
0
I'm new to VBScript and want to use VS2022 for my editing/debug.

I have been using VB, .NET, VS and others on and off for 30 years.
Now I want to automate my backup of Outlook for me and my wife every sunday.
Something like:
1) shut down Outlook if it's running
2) copy the datafile to my NAS-drive
3) start Outlook again
4) send a mail showing if it's was done or not

I have set up VS2022 for debugging VBScript but it just says:

'cscript.exe' (Script): Loaded 'Script Code (C:\Windows\System32\cscript.exe)'.
The program '[14188] cscript.exe' has exited with code 1 (0x1).

when running my VERY simple script:

Code:

Option explicit
' Dette script søger for kopiering af Outlooks datafil
' Det sker via Opgavestyring hver SØNDAG
'
Dim fraFil
Dim tilFil
fraFil = "C:\Users\kelds\AppData\Local\Microsoft\Outlook\keld.soerensens@gmail.com(2).ost"
tilFil = "X:\2 - Måneds\KS Outlook\keld.soerensens@gmail.com(2).ost"
'
' MsgBox("Er du klar ? ")

'copy dataFilNavn tilFil

MsgBox("Nu kopieres: " & fraFil & vbLf & " til " & vbLf & & tilFil & " !")

Too, I CAN'T step thrugh the script - what do I do wrong ?

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>