none
Custom form causes Outlook to crash after Windows 10 upgrade RRS feed

  • Question

  • Hello,

    I have a custom form that I created that has some VB Script behind it.  I've had no problem with it functioning properly until I had a user upgrade to Windows 10.  We are currently using Outlook 2010.  Does anything know what changed and what I need to do to fix the problem?

    Any assistance would be appreciated.

    Thanks,

    Dave

    Tuesday, November 10, 2015 3:58 PM

Answers

  • Did you try to debug the code under the debugger in VBA? Do you get any errors?

    I see that you use multiple dots in the single line of code. I'd recommend breaking the chain of property or method calls and declaring them on separate lines of code.  

    > CurrInsp.SetCurrentFormPage ("Touchdate")

    Also make sure that the mentioned form is available for the inspector. 

    • Marked as answer by Schrappa Friday, November 13, 2015 3:35 AM
    Tuesday, November 10, 2015 7:38 PM

All replies

  • What is the exact error you are receiving?  It is more likely that some dependencies aren't installed.  Does the form load correctly?  Does any of the custom code run or none at all?   How did you publish the form?  What does the code do?

    Eric Legault (MVP: Outlook)
    Co-author, Microsoft Office 2013 Professional Step-By-Step

    Tuesday, November 10, 2015 6:25 PM
    Moderator
  • Hi Eric,

    Thanks for the response.

    The form doesn't load.  I get a Microsoft Outlook has stopped working message and Outlook closes.  The form was created within Outlook.  Here is the code below.  Let me know if you need any more information or clarification.

    Thanks,

    Dave

    This function updates information from a linked contact record:

    Function Item_Open()

    dim myObj

    dim myLink

    Set myObj = Item

    Set myLinks = myObj.Links

    if myLinks.count <> 0 Then

    Set myLink = myObj.Links(1).Item

    Item.UserProperties.Find("CLLog") = myLink.UserProperties.Find("CLLog")

    End if

    End Function

    This Sub changes the form to allow for data entry:

    Sub SetInitialTouch_Click()

    Dim TempWidth, TempLeft, TempTop, TempHeight, CurrItm, CurrInsp

    Dim mpfCalender, expCalendar, ol, olns

    Set CurrItem = Application.ActiveInspector.CurrentItem

    Set CurrInsp = CurrItem.GetInspector

    TempWidth = CurrInsp.Width

    TempLeft = CurrInsp.Left

    TempTop = CurrInsp.Top

    TempHeight = CurrInsp.Height

    CurrInsp.SetCurrentFormPage ("Touchdate")

    CurrInsp.Width = 400

    CurrInsp.CurrentItem.Display

    End Sub

    This Sub creates an e-mail with some record information embedded:

    Sub AskButton_Click()

    Dim objAppt

    Dim objMail

    Set objAppt = Application.ActiveInspector.CurrentItem

    Set objMail = Application.CreateItem(olMailItem)

    With objMail

    .Subject = "Ticket Question: "&objAppt.Subject

    .Display

    .Body = "Action Item: "&objAppt.UserProperties.Find("ActionItem")&vbCr&"Assignee/Cue: "&objAppt.UserProperties.Find("Assignee")&vbCr&"Touchdate: "&objAppt.UserProperties.Find("Touchdate")

    End With

    Set objAppt = Nothing

    Set objMail = Nothing

    End Sub

    Tuesday, November 10, 2015 6:59 PM
  • What happens if you inject a Stop statement at the beginning of the Item_Open event and step through the code with the Script Debugger?  Can you try also adding some error handling statements to narrow down the line of code where it is failing?

    Eric Legault (MVP: Outlook)
    Co-author, Microsoft Office 2013 Professional Step-By-Step

    Tuesday, November 10, 2015 7:37 PM
    Moderator
  • Did you try to debug the code under the debugger in VBA? Do you get any errors?

    I see that you use multiple dots in the single line of code. I'd recommend breaking the chain of property or method calls and declaring them on separate lines of code.  

    > CurrInsp.SetCurrentFormPage ("Touchdate")

    Also make sure that the mentioned form is available for the inspector. 

    • Marked as answer by Schrappa Friday, November 13, 2015 3:35 AM
    Tuesday, November 10, 2015 7:38 PM
  • Thanks for the input. I'm breaking them into separate lines. - Dave
    Wednesday, November 11, 2015 9:20 PM
  • Hey Eric,

    Thanks.  I'm working on identifying where the problem lies and will report back.

    Dave

    Wednesday, November 11, 2015 9:21 PM
  • Hi Schrappa,

    Have you found the error code? If your issue has been resolved, it would be appreciated if you could share us your solution, if not, please feel free to let us know your current situation.
    Based on your description, outlook stopped when working with message and outlook closes, I suggest you check the event in Outlook.Items and Application_Quit event.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, November 13, 2015 3:05 AM
  • Hey Eugene,

    Thanks for your help.  This ended up being the issue with the code.  Once I broke the chains, it resolved itself.

    Dave

    Friday, November 13, 2015 3:36 AM
  • Eric,

    Thanks for the suggestions.  After I went through debugging, it ended up being the multiple dots that Eugene pointed out below.  Again, thanks for your help as well.

    Dave

    Friday, November 13, 2015 3:38 AM