• Email form no longer working

    Author
    Topic
    #356669

    We have an Outlook form that once completed as well as sending the email message inserts certain data from feilds in the form into an excel workbook.
    The form was written while we were on a NT4 platform running Office 97.
    Now the users have been moved to Citrix network, Win2000 server running Office 2000, the form still sends the email but does not update the file. No file or directory names were changed in the change of platform, and those few of us still on NT/Office 97 can still have the form work.
    Are there any known problems that would cause this problem?

    I have included the code incase an error can be spotted there, but as I say it has been working fine.

    Any assitance (even ideas on where to start looking) wiil be much appreciated

    Andrew M

    Dim myXl
    Dim myWb
    Dim myWs
    Dim myCtrls

    Sub Item_Send

    Set myCtrls = Item.GetInspector.ModifiedFormPages(“Message”).Controls

    Set myXl = Application.CreateObject(“Excel.Application”)

    Set myWb = myXl.Workbooks.Open (“g:DBdataUnderwriting Review.xls”)

    Set myWs = myWb.ActiveSheet

    myWs.Unprotect

    startRow = myWs.Cells.SpecialCells(11).Row + 1

    myWs.Cells(startRow, 1) = myCtrls(“ClaimNumber”).Value
    myWs.Cells(startRow, 2) = myCtrls(“PolicyNumber”).Value
    myWs.Cells(startRow, 3) = myCtrls(“ClientName”).Value
    myWs.Cells(startRow, 4) = myCtrls(“PolicyType”).Value
    myWs.Cells(startRow, 5) = myCtrls(“Happening”).Value

    myWs.Protect

    myWb.Save

    myWb.Close

    myXl.Quit

    Set myWs = Nothing
    Set myWb = Nothing
    Set myXl = Nothing
    Set myCtrls = Nothing

    End Sub

    Viewing 1 reply thread
    Author
    Replies
    • #528525

      Sorry, no hints as to your problem, but a little use of the With identifier might make the code a bit easier to read. Just a thought…

    • #528526

      Have you stepped through the code in debug mode? Maybe that xls is read only now or in a read only folder?

      • #535290

        I have finally managed to get back to this one. After much harrasing of the IT dept I finally sussed the problem lies within the security settings of Office 2000 (service pack 2 again). IT have managed to get some of their own forms working so I now have then trying to tweak mine to work. Will let you know if a definate cause/solution is found.

    Viewing 1 reply thread
    Reply To: Email form no longer working

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: