As I have been having trouble usign COM directly through CF  I've decided to
play arround with it using VBScript.
This works fine  locally but, once I run it on the server it  errors.

My Plan is to build up this script with CF so by the time it runs the values
have been set by data taken out of the database.
(the stage after that is to create a new contact item using a custom form)

Correctly me if I am wrong but,  won't this be run on client side  and thus
should run locally even if it has been built by CF on the server ?

<script language="VBScript">
Dim objOutlook
Dim itmContact
Dim strMsg

Const olContactItem = 2

'Create Outlook Object and Contact Item
    Set objOutlook = CreateObject("Outlook.application")
    Set itmContact = objOutlook.CreateItem(olContactItem)

'Query the User for the Contact Info
    itmContact.FullName = "Darren"
itmContact.Title = "Mr."
    itmContact.EMail1Address = "[EMAIL PROTECTED]"
    itmContact.PrimaryTelephoneNumber = "123 456 7890"
    itmContact.BusinessAddressStreet = "abc street"
    itmContact.BusinessAddressCity = "ABCTown"
    itmContact.BusinessAddressState = "ABC County"
    itmContact.BusinessAddressPostalCode = "B11 1rr"

'Save and display the Contact
    itmContact.Save
    itmContact.Display

'Clean up
    Set itmContact = Nothing
    Set objOutlook = Nothing
</script>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to