I have an application that renames the Page Title of an IE session if it is on a particular URL. (SendMessage objIE.hwnd, WM_SETTEXT, 0, ByVal new_caption)

I have noticed that on win7 IE8 if you preview the running applications on the task bar the title shows the previous window title. If you click on the preview pane and switch to that IE session it renames the Page title back to what it was before it was modified.

The same code running on winXP and ie7 works ok

Is this the correct functioning of the preview window, the preview does not appear to be previewing the current open window, what is causing it to be renamed?, is there some way round this behaviour?, etc. is it an error on my behalf?

Am I not setting the title correctly that works in ie7 but not in ie8 ?


Window_Caption = GetWindowTitle(objIE.hwnd)

If Left$(Window_Caption, 6) = "Amdocs" Then
new_caption = instancename & " - " & Window_Caption
SendMessage objIE.hwnd, WM_SETTEXT, 0, ByVal new_caption