Hi Everybody,
Firstly as a newcomer here I hope that this thread is posted in the correct forum and if not my apologies and trusting that the moderators will advise and relocate as appropriate!
I am hoping that one of the forum experts can help me solve a recurring issue surrounding automating the Start of Outlook 2016 64 Bit (but I feel certain that the issue will occur in other earlier versions and in 32 bit).
For ease of use I like to launch Outlook at Windows logon with it minimised to the system tray from where it collects mail discretely for subsequent view/action as required. I have done this for many years certainly since Outlook 2003 through 2007, 2010, 2013 and now 2016. Friend's whose PC's I support also like this useful customisation which I have incorporated on to their systems. In total this involves around 8 PC's all presently using Windows 10 64 Bit (although one is a 32 Bit version due to legacy hardware limitations).
As my coding skills are at best rudimentary I have use a variety of vbscript code itterations over the years all kindly posted or offered by other users on the web. The changes were always due to issues arising from the new Office releases the last of which being an annoying dialogue box reporting "No active explorer object found" and also that the tray icon displayed a 'cog overlay' indicating that Outlook is being used by another program.
The issue remained unresolved until quite recently when I built a new X99/i7 state of the art system which brought the opportunity to finally resolve the issue from the outset using refined code to accomplish the task efficiently. Accordingly, my enquiries resulted in the following 5 lines of code kindly offered following questions asked on an online forum and for which I am of course most grateful:
Set WshShell = CreateObject ( "Wscript.Shell" )
WshShell.Run "OUTLOOK.EXE" , 3, False
Set ol = CreateObject("Outlook.Application")
ol.ActiveExplorer.Activate
ol.ActiveExplorer.WindowState = 1
This was duly compiled to a .vbs file and a shortcut to it created in the Startup folder. A subsequent revision was made to incorporate a registry string pointing to the (now relocated) shortcut to run automatically at login. I was delighted that in both of these configurations the process performed to perfection.
Two days ago I experienced an (unrelated) issue with my Linksys Router and following the direction of the Linksys telephone support staff which only involved (so far as the PC/Operating System was concerned) re-configuring both Gigabit Ethernet Adapters to an assigned IP Address and back again to receiving the ISP Generated IP Address (OS default setting). Also the temporary installation of the Telnet Client (which in the event was actually never used) NB. I only mention these because the issue only arose after those changes were made though I cannot imagine any way in which they might be related
Following the above changes the system was rebooted and immediately reported "No active explorer object found" as the script was initiated. The Outlook icon is displayed upon the taskbar and clicking upon the box's 'OK' (only) button opens Outlook in a fully maximised window but the script obviously does not continue. The script appears to fail upon the line " Set ol = CreateObject("Outlook.Application") " and experimentation confirms this is the case. I seem to recall that this part of the script invokes the automation functions within Outlook, perhaps someone can confirm this?
I am totally mystified as to why a perfectly flawlessly operating feature should so suddenly fail in this manner and I am at a loss to figure out what has occured. In attempt to return things to their previous good function I chose a recent restore point prior to the issue and successfully performed the restore, regrettably this does not improve the outcome
Hopefully somebody can suggest what is going on, how/where to identify the cause and of course resolve the problem. It might help if someone could elaborate (in simple language) as to precisely just how the faulting code line normally works and how this relates to the dialogue box error. As noted above this has occured previously with other code on other systems though never before when previously functioning flawlessly.
No other changes have been made either to the Operating System, Office 2016 or Outlook 2016. Additionally, the same applies to the Outlook Addins, no changes from the previously perfect setup. NB. Add ins include Adobe Acrobat and various CodeTwo free addins.
Incidentally, to preserve data integrity I have customised each of the above systems such that the user folders are redirected to a discrete HDD location usually D: or E: (as in this case) similarly the default PST file location for the POP mail is located here and not to the usual Outlook default. Similarly, the vbscript file and it's associated shortcut are also maintained in a sub directory here. Again this directory structure has not changed between the original success and the subsequent failure......only mentioning in case it is relevant.
Does any off this make any sense to the forum regulars?
All help and advice gratefully received.
Many thanks in advance,
PC Pilot
Firstly as a newcomer here I hope that this thread is posted in the correct forum and if not my apologies and trusting that the moderators will advise and relocate as appropriate!
I am hoping that one of the forum experts can help me solve a recurring issue surrounding automating the Start of Outlook 2016 64 Bit (but I feel certain that the issue will occur in other earlier versions and in 32 bit).
For ease of use I like to launch Outlook at Windows logon with it minimised to the system tray from where it collects mail discretely for subsequent view/action as required. I have done this for many years certainly since Outlook 2003 through 2007, 2010, 2013 and now 2016. Friend's whose PC's I support also like this useful customisation which I have incorporated on to their systems. In total this involves around 8 PC's all presently using Windows 10 64 Bit (although one is a 32 Bit version due to legacy hardware limitations).
As my coding skills are at best rudimentary I have use a variety of vbscript code itterations over the years all kindly posted or offered by other users on the web. The changes were always due to issues arising from the new Office releases the last of which being an annoying dialogue box reporting "No active explorer object found" and also that the tray icon displayed a 'cog overlay' indicating that Outlook is being used by another program.
The issue remained unresolved until quite recently when I built a new X99/i7 state of the art system which brought the opportunity to finally resolve the issue from the outset using refined code to accomplish the task efficiently. Accordingly, my enquiries resulted in the following 5 lines of code kindly offered following questions asked on an online forum and for which I am of course most grateful:
Set WshShell = CreateObject ( "Wscript.Shell" )
WshShell.Run "OUTLOOK.EXE" , 3, False
Set ol = CreateObject("Outlook.Application")
ol.ActiveExplorer.Activate
ol.ActiveExplorer.WindowState = 1
This was duly compiled to a .vbs file and a shortcut to it created in the Startup folder. A subsequent revision was made to incorporate a registry string pointing to the (now relocated) shortcut to run automatically at login. I was delighted that in both of these configurations the process performed to perfection.
Two days ago I experienced an (unrelated) issue with my Linksys Router and following the direction of the Linksys telephone support staff which only involved (so far as the PC/Operating System was concerned) re-configuring both Gigabit Ethernet Adapters to an assigned IP Address and back again to receiving the ISP Generated IP Address (OS default setting). Also the temporary installation of the Telnet Client (which in the event was actually never used) NB. I only mention these because the issue only arose after those changes were made though I cannot imagine any way in which they might be related
Following the above changes the system was rebooted and immediately reported "No active explorer object found" as the script was initiated. The Outlook icon is displayed upon the taskbar and clicking upon the box's 'OK' (only) button opens Outlook in a fully maximised window but the script obviously does not continue. The script appears to fail upon the line " Set ol = CreateObject("Outlook.Application") " and experimentation confirms this is the case. I seem to recall that this part of the script invokes the automation functions within Outlook, perhaps someone can confirm this?
I am totally mystified as to why a perfectly flawlessly operating feature should so suddenly fail in this manner and I am at a loss to figure out what has occured. In attempt to return things to their previous good function I chose a recent restore point prior to the issue and successfully performed the restore, regrettably this does not improve the outcome
Hopefully somebody can suggest what is going on, how/where to identify the cause and of course resolve the problem. It might help if someone could elaborate (in simple language) as to precisely just how the faulting code line normally works and how this relates to the dialogue box error. As noted above this has occured previously with other code on other systems though never before when previously functioning flawlessly.
No other changes have been made either to the Operating System, Office 2016 or Outlook 2016. Additionally, the same applies to the Outlook Addins, no changes from the previously perfect setup. NB. Add ins include Adobe Acrobat and various CodeTwo free addins.
Incidentally, to preserve data integrity I have customised each of the above systems such that the user folders are redirected to a discrete HDD location usually D: or E: (as in this case) similarly the default PST file location for the POP mail is located here and not to the usual Outlook default. Similarly, the vbscript file and it's associated shortcut are also maintained in a sub directory here. Again this directory structure has not changed between the original success and the subsequent failure......only mentioning in case it is relevant.
Does any off this make any sense to the forum regulars?
All help and advice gratefully received.
Many thanks in advance,
PC Pilot