Summary: Is there a alternative for the GOTO statement in vbScript for outlook 98 - if so will it fit the sketch below
I'm having to do a complex e-form in outlook. Worked out how to prepare a printout for customer (Using word) in single case but they want not line by line - I mdled it in VB6 and it goes like this
StartLineCheck:
if strPrint1 = "ready" then
str1 = ctls("Name".value
str2 = ctls("Name".value
'and so on
goto PrintForm
end if
if strPrint2 = "ready" then
str1 = ctls("Name".value
str2 = ctls("Name".value
'and so on
goto PrintForm
end if
'and so on for the ten lines
goto theend:
printform:
'code to open a word template and print out the variables in bookmarks
goto StartLineCheck
TheEnd:
I expected the code to work but it errors on the GOTO statement, It appears GOTO is not in VB script, can anyone suggest a sensible alternative
I'm having to do a complex e-form in outlook. Worked out how to prepare a printout for customer (Using word) in single case but they want not line by line - I mdled it in VB6 and it goes like this
StartLineCheck:
if strPrint1 = "ready" then
str1 = ctls("Name".value
str2 = ctls("Name".value
'and so on
goto PrintForm
end if
if strPrint2 = "ready" then
str1 = ctls("Name".value
str2 = ctls("Name".value
'and so on
goto PrintForm
end if
'and so on for the ten lines
goto theend:
printform:
'code to open a word template and print out the variables in bookmarks
goto StartLineCheck
TheEnd:
I expected the code to work but it errors on the GOTO statement, It appears GOTO is not in VB script, can anyone suggest a sensible alternative