Hide custom page?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: John Riddle (JohnRiddle_at_discussions.microsoft.com)
Date: 06/28/04


Date: Mon, 28 Jun 2004 10:24:02 -0700

Hello,

I have a custom tab on a contact and based on whether a file exists in a shared directory, the custom page will be displayed. My problem is that if the page is not displayed for a contact, it doesn't show the page exactly like it is supposed to. However, if you close and re-open the contact (without first switching to a different contact in the folder view and switching back), then there's an error opening the contacts saying (Object required). My code that runs in the item_open event is pasted below:

Sub Item_Open()
Set myBrowser = Item.GetInspector.ModifiedFormPages("MS Word Resume").WebBrowser1
strResumePath = "\\wgny\wilson group shared\resumes\"
strResumeName = Item.FirstName & " " & Item.LastName & ".doc"
Set resumeFSO = CreateObject("Scripting.FileSystemObject")
If resumeFSO.FileExists(strResumePath & strResumeName) Then
        strResumePath = strResumePath & strResumeName
ElseIf resumeFSO.FileExists(strResumePath & Item.FirstName & Item.LastName & ".doc") Then
        strResumeName = Item.FirstName & Item.LastName & ".doc"
        strResumePath = strResumePath & strResumeName
Else
        on error resume next
        Item.GetInspector.HideFormPage "MS Word Resume"
End If

End Sub

Does anyone know of a better way to accomplish this same thing?

John



Relevant Pages

  • Re: Hide custom page?
    ... This would be the preferred syntax for returning an object for a control, ... > Sub Item_Open ... > Set myBrowser = Item.GetInspector.ModifiedFormPages("MS Word ... > strResumePath = strResumePath & strResumeName ...
    (microsoft.public.outlook.program_forms)
  • Re: IE not detected
    ... Private Declare Function GetDesktopWindow Lib "user32" As Long ... ByVal lpFile As String, ByVal lpParameters As String, _ ... Public Sub RunShellExecute ... > Set mybrowser = CreateObject ...
    (microsoft.public.excel.programming)
  • IE not detected
    ... excelforums did not appeared on this news group. ... I have noticed that the application always opens a new ... Sub detect_IE ... Set mybrowser = GetObject ...
    (microsoft.public.excel.programming)