Hey /w VB Code...

I had this code to switch my view every hour to the Outlook main screen; 
but it no longer works /w Outlook 2003 - can anyone help?

Thanks in advance!

Dim iHour

Private Sub SwitchView()
    If Hour(Now) <> iHour Then
        Dim ctl As Office.CommandBarControl
        Dim cbpop As Office.CommandBarPopup
        Dim cb As Office.CommandBar

        Set cb = Application.ActiveExplorer.CommandBars("Menu Bar")
        Set ctl = cb.FindControl(ID:=5599, Recursive:=True)
        ctl.Execute
        iHour = Hour(Now)
        Set ctl = Nothing
        Set cb = Nothing
    End If
End Sub
0
6/3/2004 4:48:53 AM
outlook 87535 articles. 10 followers. Follow

3 Replies
745 Views

Similar Articles

[PageSpeed] 17

The code looks correct at first and also the command ID for Outlook Today 
hasn't been changed.

Do you have the Macro enabled? As a secure default Outlook doesn't load 
unsigned macro's. You can change this in Tools-> Macro-> Security

-- 
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-Creating Signatures
-Create an Office XP CD slipstreamed with Service Pack 3

-----
"-=Sojourn=-" <p.ferrisRePlY@rogers.com> wrote in message 
news:MPG.1b2877c355e0f414989699@66.185.95.104...
>I had this code to switch my view every hour to the Outlook main screen;
> but it no longer works /w Outlook 2003 - can anyone help?
>
> Thanks in advance!
>
> Dim iHour
>
> Private Sub SwitchView()
>    If Hour(Now) <> iHour Then
>        Dim ctl As Office.CommandBarControl
>        Dim cbpop As Office.CommandBarPopup
>        Dim cb As Office.CommandBar
>
>        Set cb = Application.ActiveExplorer.CommandBars("Menu Bar")
>        Set ctl = cb.FindControl(ID:=5599, Recursive:=True)
>        ctl.Execute
>        iHour = Hour(Now)
>        Set ctl = Nothing
>        Set cb = Nothing
>    End If
> End Sub 


0
Roady
6/3/2004 9:24:26 AM
In article <#KJdlxUSEHA.3728@TK2MSFTNGP11.phx.gbl>, 
newsgroups_DELETE_@_DELETE_sparnaaij_NO_._SPAM_net says...
> The code looks correct at first and also the command ID for Outlook Today 
> hasn't been changed.
> 
> Do you have the Macro enabled? As a secure default Outlook doesn't load 
> unsigned macro's. You can change this in Tools-> Macro-> Security
> 
> 
It loads the macro fine, if I step through it it runs the code, but 
doesn change the view to Outlook Today.
0
6/3/2004 1:22:58 PM
See if the developers can help you with it in the outlook.program_vba 
newsgroup

Good luck!

-- 
Robert Sparnaaij [MVP-Outlook]
www.howto-outlook.com

Tips of the month:
-Creating Signatures
-Create an Office XP CD slipstreamed with Service Pack 3

-----
"-=Sojourn=-" <p.ferrisRePlY@rogers.com> wrote in message 
news:MPG.1b28f04cf29f2bb398969a@66.185.95.104...
> In article <#KJdlxUSEHA.3728@TK2MSFTNGP11.phx.gbl>,
> newsgroups_DELETE_@_DELETE_sparnaaij_NO_._SPAM_net says...
>> The code looks correct at first and also the command ID for Outlook Today
>> hasn't been changed.
>>
>> Do you have the Macro enabled? As a secure default Outlook doesn't load
>> unsigned macro's. You can change this in Tools-> Macro-> Security
>>
>>
> It loads the macro fine, if I step through it it runs the code, but
> doesn change the view to Outlook Today. 


0
Roady
6/5/2004 10:28:41 AM
Reply:

Similar Artilces:

ODBC Setup on client side w/multiple instances of SQL
We will soon be running two apps, including GP, that utilize SQL DBs on the same server. Rest assured, GP plays a small role transactionally, and multiple instances of SQL Server 2000 were installed. During the installation, Port 1430 was specified for the GP instance. During ODBC setup, in the client configuration, should I specify the port number in the connection parameters or leave the default "Dynamically determine port?" Thanks. You can have it dynamically determine the port, however, I don't believe anything LOWER than 1433 will work for Great Plains - at least ...

Format several pages at once w/o data changing (Excel).
I have a user that used Lotus 123 to format several pages at once; however, not changing the data within the cells amongst these pages. So whenever you format the sheet, the other sheets format as well. And if you change a number, it will only change on that sheet and not the rest. We are now using Excel 2003 and was wondering if it had the same capability as Lotus 123. I was unsuccessful in finding a way to do this. You can group sheets by holding down the CTRL key as you click the sheet tabs. Any changes made to one sheet will be made to all grouped sheets. Right-click a sheet an...

create text box with Border Art using VB
Hi, Publisher 2002/Office XP Can anyone tell me how to create a border round a text box (one of the built-in border art ones) while creating it from VB? The box is created thus (so far):- Set pubdoc = appPub.ActiveDocument.Pages(1) With pubdoc Set TextBox = .Shapes.AddTextbox _ (Orientation:=pbTextOrientationHorizontal, _ Left:=144, Top:=144, _ Width:=72, Height:=18) With TextBox .TextFrame.TextRange.Text = "some text" End With End With I created one in Publisher, then used VB to open the document and work through the Shapes collection to show me ...

item Lookup Code
Is there a way for RMS to create ILC's automatically?? It is a bit of a pain when creating new items and you have to make sure the ILC is not already taken. Any suggestions would be great!! Cynthia It can be done with a little database programming. I don't recommend doing this unless you are very experienced with database programming. Ask your RMS partner about this - they may refuse to do it - it's not exactly risk free... There are also some add-ins out there that sort of take the place of New Item Wizard and will auto create lookup codes. Most are only sold through ...

Find workbook with code.
Hi All, I have about 4 excel workbooks that related to my db.I want to include these 4 workbooks as one package with my DB.I create a package cause need to copy to another computer. Let say their names are MyWorkbook 1,2,3,and 4. Currently I write the code to open the workbook like below. Set appXL = CreateObject("Excel.Application") Set wkb = appXL.Workbooks.Open("C:\MyFolder\MyWorkbook.xls") Set wks = wkb.Worksheets(1) But if I copy the package and put it in another computer,mean the code need to be modified,isn't it?.And I don't want to get busy with that. I w...

hey, no really hey!
fuck you. www.tenbase2.com ...

MS06-019 w/7232.84
I just went to install the hotfix above but noticed my store version was "below" the version requiring the hotfix. I'm running Ex2k3 Enterprise Sp1. Even though I'm on Sp1, it looks like I have an older version of the store. Do I still need to install the hotfix? Thanks Not sure what you are looking at. The table found in http://www.microsoft.com/technet/security/bulletin/ms06-019.mspx?pubDate=2006-04-11 should list the version number of store.exe and other files AFTER the hotfix is applied. -- Ben Winzenz Exchange MVP MessageOne Read my blog! http://winzenz.blog...

Outlook 2000 SP3 crashes receiving mail w/attachments
Outlook 2000 SP3 crashes receiving mail w/attachments. It will receive email without attachments fine. It sends email with or without attachments fine. Outlook Express on the same pc does not have this problem. The operating system is XP Home with all updates applied ...

ASP .NET 2.5 - VB - Excel 2003
Hello, This is my setup: Application's front-end tools: Visual Studio 2005, ASP .Net 2.5, VB, Excel 2003 Web server running Win Server 2003 I have a pre-formatted spreadsheet (that's why this cannot be done with a ..csv file) in Excel 2003. It needs to be populated with data retrieved from SQL server with a stored procedure. After populated the resulting spreadsheet file needs to be accessible to the web application's user in their local PC, so (s)he can open it and add other data by directly editing the spreadsheet outside the application. How it works now...

Wasp WWS Bar Code Scanner
I have RMS 1.3 operations and I would like to know if this scanner is easy to set up at the POS. We have big items and the scanners we use at the register is wired. ...

Implement a VB interface.
Hello. What is the equivalent code in VB (As the following C# code) ? public interface myInterface : UpInterface { } .... How can I implement the UpInterface in VB.NET ? Need sample code, please. Thanks :) Mr. X. schrieb: > Hello. > What is the equivalent code in VB (As the following C# code) ? > > public interface myInterface : UpInterface > { > } > .... > > How can I implement the UpInterface in VB.NET ? > > Need sample code, please. > > Thanks :) RTFM -- Armin "Mr. X." <nospam@nospam_pleas...

error code 0x80070021 05-25-10
I get this error code when I'm trying to backup email in Outlook. Where are the error messages listed on the Microsoft website or any other website that is free? Is Outlook closed when you try to back it up? Have you exited Outlook and even made sure that the OUTLOOK.EXE process is not running? -- Kathleen Orland "Yocalmama" <Yocalmama@discussions.microsoft.com> wrote in message news:94E229ED-4090-44D1-8FAF-708F95F0A13D@microsoft.com... > I get this error code when I'm trying to backup email in Outlook. Where are > the error messages liste...

Hey /w VB Code...
I had this code to switch my view every hour to the Outlook main screen; but it no longer works /w Outlook 2003 - can anyone help? Thanks in advance! Dim iHour Private Sub SwitchView() If Hour(Now) <> iHour Then Dim ctl As Office.CommandBarControl Dim cbpop As Office.CommandBarPopup Dim cb As Office.CommandBar Set cb = Application.ActiveExplorer.CommandBars("Menu Bar") Set ctl = cb.FindControl(ID:=5599, Recursive:=True) ctl.Execute iHour = Hour(Now) Set ctl = Nothing Set cb = Nothing End If End...

Excel VB-Copy formula down until adjacent cell (left) is blank?
Here is exactly what I am trying to do through VB in Excel: Weekly data pull fills colums A:G. Row count is always different. I am modifying the data pull through VB, and I have a VLOOKUP formula in cell H2. What I want VB to do is copy that formula down column H to the last row (with data) each week. I guess I want it to be dynamic so that as rows decrease/increase the formula is only copied down to the final row/record. I know someone out of this smart group will know how to do this! Thanks in advance! Tony (pseudo code) in a macro .... dim lngLastrow as long dim rngTarget...

How do I remove the page number from the background of my excel w.
When working in Excel, the background page number is always obscuring my work. Can it be removed? Hi goto 'View' and choose the normal view. You currently have the 'Pagebreak view' enabled -- Regards Frank Kabel Frankfurt, Germany "NancyLyons" <NancyLyons@discussions.microsoft.com> schrieb im Newsbeitrag news:4476930A-38E1-4BAD-89D1-79DBA1E17B38@microsoft.com... > When working in Excel, the background page number is always obscuring my > work. Can it be removed? Maybe go View and check Normal instead of Page Break Preview, Regards, "NancyLyons...

Issues w/ v3c release
I've install MS CRM v3c, on Vista w/ Office 2207. Everything seems to work find except when I select the "view regarding" or "view in CRM" in the task w/in Outlook it opens up the web page "http://crm//_root/stage.aspx" which doesn't pull up the regarding contact information. From within the Outlook task it will show the correct Contact but cannot pull up an IE page with the CRM data loaded. Any help would be greatly appreciated. ...

Passing a Date Variable from Code to Update Query in a Loop
My challenge is to pass a changing date variable from the code to an Update Query. I already have a variable declared (DateComplete) and in use within the code that contains the value I want to pass, but just not sure how to make it happen using the DoCmd.OpenQuery structure. Below is some of the code to help scope this out: ====================== Private Sub CmdImport_Click() 'Import Files -- using the dates input on the form On Error GoTo Err_CmdImport_Click Dim dbMyDB As Database Dim EndDate As Date Dim PrevDate As Date Dim StartDate As Date Dim d As Integer Dim DaystoImpor...

hey sup guys
hey sup guys im looking for someone to talk to anyone avalible "sarah " <sarah@yahoo.com> a �crit dans le message de news:%23WRb6fnAKHA.5040@TK2MSFTNGP04.phx.gbl... > hey sup guys im looking for someone to talk to anyone avalible ...

transaction analysis codes and transaction analysis group codes
hi can anyone help me to resolve my issue on transaction analysis codes. my client is a manufacturing company, so they used trasaction analysis codes for their transactions in receivables, payables, including invoice match, payables trx, sales voucher, voucher payable, sales invoices and journal entries. the problem is when they enter transaction on the said modules, when they enter the ff distributions w/ transactions analysis for every account #, the system hungs when they lookup the analysis button which is the blue letter ("A"). after that, they took a few minutes to con...

merge w/filemaker pro
I upgraded to Word 2004 for Mac so that I could do mail merges with Filemaker Pro 7 databases, but when I try to select the data source from the data merge manager, it won't let me select the Filemaker databases. Any advice would be appreciated. That's a known issue. FileMaker 7 creates databases in a different structure than previous versions, and as a result Word, which was designed for use with FileMaker 6 and earlier, cannot read the databases. There is no workaround at the moment other than not working with a FileMaker 7 database. Your request here for FileMaker 7 support ...

Problem Printing w/Calendar Assistant
Every time I attempt to print a calendar using the Assistant it prints one page and then stops. I have tried to print multiple pages of a weekly calendar and each time it prints one week and then stops. I love the layout and colors of the calendar but I can not get more than one weekly calendar to print no matter how many weeks I select to be printed. Calendar Printing Assistant is known to be quirky. It works best with Outlook 2007. I cant say i know a fix for your issue. However, if you cant work around for this issue or you need a better printing solution, consider using...

hey
hey bby ...

Zip Code
Hi all, Does anyone have a good ZipCode db they dont mind sharing? If so please send em a copy at d9pierce@mchsi.com Thanks! You might try here: http://databases.about.com/od/access/a/zipcodedatabase.htm d9pierce@mchsi.com wrote: >Hi all, >Does anyone have a good ZipCode db they dont mind sharing? If so >please send em a copy at d9pierce@mchsi.com > >Thanks! -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200703/1 On Mar 19, ...

Calling a non-Unicode function with CString parameters from Unicode compiled code
I have UNICODE enabled in my code. The problem is I need to call a couple externally defined functions that take CStrings as parameters. Since a CString in the Unicode aware code is really a CStringW the function signature does not match with the caller. In non-Unicode DLL (which I cannot change) are functions like this -> CControl(CString strFileC, CString strFileP, <non-CString parameters here>) Calling from Unicode compiled code like this -> CString cFile = "myFileC"; CString pFile = "myFileP"; CControl myControl (myFileC, myFileP, <non-CString par...

Server 2003
Our developers created some DOS (bat) command scripts to run on three different servers, they put them in scheduled jobs to run at specific times of the day - to import client files off our FTP server, copy from server to server inside our domain. The scheduled jobs do not run, yet when we right click on the schedules jobs, click run - they do work manually. The schedules jobs are enabled, "run as" - domain\administrator and domain\user (with administrator permission) - should the jobs "only" run as "administrator", and not a user with admin...