Need advice for correct event

Status
Not open for further replies.
Q

QWRkaW5fTm9vYg

Greetings all,

I recently developed some code for outlook that puts a button on the

commandbar. I noticed that the button should be hidden when not viewing

emails. I took the following strategy to get this working:

Private Sub m_olExplorer_FolderSwitch()

Select Case m_olExplorer.CurrentFolder.Name

Case "Inbox"

objCommandBarButton.Visible = True

Case Else

objCommandBarButton.Visible = False

End Select

End Sub

Unfortunately, I seem to get a small bit of flicker. In otherwords the

commandbar appears, then the Folderswitch event fires, then the button is

reenabled.

It looks like everything else is being occuring during a previous event...

Am I using the correct event? Is there a better way to do this? The flicker

looks pretty unprofessional.

-Tim
 
Please do not multipost. See my answer in the other group you posted in.

"Addin_Noob" <AddinNoob> wrote in message

news:7D0225EA-CFE0-4F00-B7A4-156025CAFF9D@microsoft.com...
> Greetings all,

> I recently developed some code for outlook that puts a button on the
> commandbar. I noticed that the button should be hidden when not viewing
> emails. I took the following strategy to get this working:

> Private Sub m_olExplorer_FolderSwitch()
> Select Case m_olExplorer.CurrentFolder.Name
> Case "Inbox"
> objCommandBarButton.Visible = True
> Case Else
> objCommandBarButton.Visible = False
> End Select
> End Sub

> Unfortunately, I seem to get a small bit of flicker. In otherwords the
> commandbar appears, then the Folderswitch event fires, then the button is
> reenabled.

> It looks like everything else is being occuring during a previous event...
> Am I using the correct event? Is there a better way to do this? The
> flicker
> looks pretty unprofessional.

> -Tim
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
O Need advice ASAP! Outlook 2003. Using Outlook 1
e_a_g_l_e_p_i Need clarification on 2-Step Verification for Gmail using Outlook 2021 Using Outlook 10
S Custom Contact card - need help creating one Outlook VBA and Custom Forms 1
P OT: Need website like this one, but for Excel Using Outlook 0
S Need code to allow defined starting folder and selection from there to drill down Outlook VBA and Custom Forms 10
D Need help with MS Authenticator Using Outlook 4
I Outlook for Mac 2019 using on desktop and laptop IMAP on both need help with folders Using Outlook 1
FryW Need help modifying a VBA script for in coming emails to auto set custom reminder time Outlook VBA and Custom Forms 0
S.Champ Please help? I've imported a random workcalendar I dont even know who's. Can I undo it? and then I need to re-sync the google one again. Its a mess:( Using Outlook 2
B Need to Copy an email to a subfolder Outlook VBA and Custom Forms 2
D Do I need Exchange Add-In? Using Outlook 6
L Need help modifying a VBA script for emails stuck in Outbox Outlook VBA and Custom Forms 6
K Need to convert .mmf file to .pst format Outlook VBA and Custom Forms 7
glnz Moving from Outlook 2003 to MS365 Outlook - need basics Using Outlook 4
J Moved many emails to Outlook external folder, need to delete on Gmail server Using Outlook 14
A Wishlist Arthur workman I need the community's assistance thank you Using Outlook 3
A from Arthur to anyone I need your expertise assistance Using Outlook.com accounts in Outlook 7
Marc2019 Need help please! Cannot Setup my outlook email account on my Mac Outlook 2011 Using Outlook.com accounts in Outlook 2
T Need to backup outlook.com to cloud storage, without desktop software - Testing UpSafe. Are there any similar services? Using Outlook.com accounts in Outlook 8
C need help setting up outlook first time Using Outlook 1
N Need help syncing contacts to iPhone X Using Outlook 8
L Need to import multiple Outlook files to Office 365 Account Using Outlook 4
S Received mail as part of DL, need to auto-CC the same when replying Outlook VBA and Custom Forms 5
C Need VBA code to automatically save message outside outlook and add date Outlook VBA and Custom Forms 1
S Error using AddressEntry.GetContact - need help Outlook VBA and Custom Forms 2
E Outlook 2010 need help with rules Using Outlook 0
Horsepower Need iCloud mail only Using Outlook 1
O Don't need any add-ins at all? Using Outlook 2
B Need Help - Willing to pay Outlook VBA and Custom Forms 10
A Need to view Outlook calendar in Sharepoint .. Using Outlook 2
J Need Help with Contacts VBA Outlook VBA and Custom Forms 1
L Accidentally merged a calendar with .ics, need to undo! Using Outlook 1
H Need help setting up GetFolderPath-Makro with Vodafone IMAP Mail-Account Outlook VBA and Custom Forms 0
D Need Genuine Office or Outlook 2007 Using Outlook 3
G how to cancel a recurring meeting but not the organizer but all attendees need to know. Using Outlook 1
H I need a developer to customize an Outlook Contact form Outlook VBA and Custom Forms 0
T Need help with finding/updating task Outlook VBA and Custom Forms 1
N Need a case sensitive rule Outlook VBA and Custom Forms 1
C Need rule to alert when an email has not been replied to within 24 hours Using Outlook 1
P Outlook 2003 - Do I need a new profile? Using Outlook 2
F Outbox - Multiple Emails need to be manually opened? Using Outlook 5
Miquela I need to make a calendar to share here at work with 40 other people Using Outlook 1
S Need CC: to show the original To: recip[ients Using Outlook 4
Denis Hi everyone!!! Need some help with Excel to Exchange Calendar??PLEASE>>> Using Outlook 1
D Need to extract a line from a word attachment, and add it to the subject line Outlook VBA and Custom Forms 3
Mary B VBscript: Need to copy every email to a folder & mark that copy as read Outlook VBA and Custom Forms 5
mikecox Desperat; need hands on support Using Outlook 1
E Need Help on Setting up a repeated Reminder on Task with Reoccurence Every Year Using Outlook 6
Glyn Do I Need Outlook.com Using Outlook 1
B Need Help Creating Email Based on Subject w Address in Body Outlook VBA and Custom Forms 1

Similar threads

Back
Top