How can I clear the cache in an Outlook client programmatically? - caching

I am executing the following routine often in order to clear the local cache of many Outlook clients (Outlook 2003) in order to fix corrupted Forms stored on the users local drive.
On the Tools menu, click Options, and then click the Other tab.
Click Advanced Options.
In the Advanced Options box, click Custom Forms.
In the Custom Forms box, click Manage Forms.
In the Forms Manager box, click Clear Cache.
Is there a way I can program this to occur on the local client?
I am looking for a solution that could be included in Outlooks VBScript in order to include it in yet another 'Organizational Forms Library' Forms client side validation code.

Related

Access 2013: Disabled Mode

I am having a great deal of difficulty identifying the source a problem I am having with "disabled mode" in MS Access 2013. I have read all of the support literature for 2007, 2010, and 2013 pertaining, and none of it is productive in solving the issue.
When I go to perform any sort of modification query in one of my database files I get the "The action or event has been blocked by Disabled Mode" message at the bottom bar. There is no message bar that comes up and asks me if I want to enable the content, despite this option being checked in the trust center. I have also tried going into the File>info backstage view, however, there is no "enable" button here either as reported in the 2013 help document.
Possibly the most telling characteristic of this problem is that it is not manifested in the original database of which the current database is an exact copy. I'm not sure what to make of this though.
Enable database content for a session
To enable database content for a session, you use the Message Bar.
The Message Bar
The Message Bar appears just under the Ribbon, and is part of the Microsoft Office Fluent User Interface. If the Message Bar is not visible, you must first show the message bar. In some cases, you will also have to enable the Message Bar. Once the Message Bar is visible and enabled, you can use it to enable database content for a session.
Step 1: Show the Message Bar
If the Message Bar is already visible, you can skip this step.
On the Database Tools tab, in the Show/Hide group, select the Message Bar check box.
If the Message Bar check box is disabled, you will have to enable it.
Step 2: Enable the Message Bar
If the Message Bar check box is enabled, you can skip this step.
1.Click the Microsoft Office Button Office button image, and then click Access Options.
2.In the left pane of the Access Options dialog box, click Trust Center.
3.In the right pane, under Microsoft Office Access Trust Center, click Trust Center Settings.
4.In the left pane of the Trust Center dialog box, click Message Bar.
5.In the right pane, click Show the Message Bar in all applications when content has been blocked, and then click OK.
6.Close and reopen the database to apply the changed setting.
Step 3: Enable database content for a session
1.In the Message Bar, click Options.
2.In the Microsoft Office Security Options dialog box, click Enable this content, and then click OK.
Top of Page
Enable a database by default
To specify that a given database is trustworthy and should be enabled by default, make sure that the database file is located in a trusted location. A trusted location is a folder or file path on your computer or a location on your intranet from which it is considered safe to run code. Default trusted locations include the Templates, AddIns, and Startup folders. You can also specify your own trusted locations.
Tip If you want to know the path of the current database, click the Microsoft Office Button, click Manage, and then click Database Properties. The full path of the current database's location is listed on the General tab of the Database Properties dialog box.
Move a database file to a trusted location
Open the folder where the database file is currently located, and then copy the database file into the trusted location that you want.
Specify a trusted location
1.In the Message Bar, click Options.
2.At the bottom of the Microsoft Office Security Options dialog box, click Open the Trust Center.
3.In the left pane of the Trust Center dialog box, click Trusted Locations.
4.To add a network location, in the right pane, select the Allow Trusted Locations on my network check box.
5.Click Add new location.
6.In the Microsoft Office Trusted Location dialog box, do one of the following:
In the Path box, type the full path of the location that you want to add.
Click Browse to browse to the location.
7.To specify that subfolders of the new trusted locations should also be trusted, select the Subfolders of this location are also trusted check box.
8.Optionally, in the Description box, type a description for the trusted location.

VS2010: How to see GUI

I need to know how to open the form of a program I am debugging.
I loaded an existing solution into VS2010, I can see the code, but I want to see the GUI part of the project, click on buttons and see what part of the code they take me to, set breakpoints where I feel like.
I don't know how to see the GUI in VS2010, where can I do that?
Also, where would be a good resource to learn the ins and outs of VS2010?
Depending on how the UI was created, there may or may not be a way to see the UI at design time. Particularly if this is an older Windows UI application, it's likely that the windows are created entirely in code, and there is no design-time UI for you to see.
There is a dialog editor, for dialog windows that are defined in resource (*.rc) files. CTRL-SHIFT-E brings up the Resource Viewer and you can look for things under the Dialog node. It is possible that your main window is a dialog-style window, as that's one of the options you get when you create a new MFC-based application.
Otherwise, your only option to see what your UI looks like is to run the program and see. Tracking down which UI elements do which actions in your program will require finding the appropriate event handlers or message handler methods (again, depending on what UI framework, if any, is in use) and setting breakpoints.
The generic answer is:
Hit F5 to starting Debugging mode. (Or under the Debug menu choose Start Debugging)
But it depends on how your project is setup and what type of project it is if F5 will work that easily for you.
What kind of program/language are you using?
With a form, I believe you have to File-->Open-->Project/Solution
Now if its a website, you would open Website. If you tried to open a windows form under a website then you wont see the design.
Typically you would just double click your form name (form1.cs) because then your design view will pop up or hit Shift+F7 or rightclick --> view designer. Then just double click whatever tools you have on your form (like a button) and it will automatically go to the button code.
If its a website, then it would be under website1.aspx while the code sits in website1.aspx.cs
But if none of that helps, here is a good place to learn this stuff
VisualStudioWalkthroughs

VS2010: Why do my custom Toolbox tabs and contained controls keep disappearing?

This is how I expected the toolbox to work:
Let's say I add a custom Tab to the Toolbox called "Ajaxtoolkit." To add controls to the new tab, I right mouse click and select "Choose Items" and browse to a file, Ajaxtoolkit.dll, that is of a particular version number.
I would expect that when I save and reopen the solution, that the Ajax Toolkit custom tab would still be in my Toolbox and that it would contain the same controls that were there last time, the controls that were in the dll that I referenced when the controls were added.
If I created a brand new web app, I (possibly) wouldn't expect to see the same Ajax Toolkit custom tab. However, I could perform the same steps as above and add a "Ajax Toolkit" tab and perhaps, this time, select a DIFFERENT VERSION of the tookit, and the state of the toolkit would be retained with each solution file.
Another possibility would be for the original Ajaxtoolkit to be retained when the 2nd web solution is created, and perhaps, if I wanted to mix versions of the toolkit across diffreent web sites in my solution, I should start naming my custom toolkit tabs with version specific names like "Ajaxtoolkit 4.0," etc.
...But instead, the Ajaxtoolkit tab disappears when I close VS2010 and reopen it.
Why? Is this desirable behavior or a bug?
You know VS2010 is a fully customizable IDE, may be these features conflicts your toolbox customization.

Visual Studio UI Improvement OCD Mode

I am wondering if anyone knows how to pull this off. Here goes.
I have a multi monitor setup, and I maximize Visual Studio to both windows. I create a new vertical document tab control, so that I have one document tab control in each physical screen. This is fine.
Now, I want to be able to make them work as if they were connected. I want to have the designer on one side, and the code related to the displayed designer on the other window.
I'd like it to have the following functionality:
If a item is double clicked on the solution explorer, open designer/code in both tabs.
When a document is selected in either pane, open appropriate file in the other pane.
Make the designer view refresh on edit, or periodically.
Any ideas on how I could pull this off?
Try to check (wait) for VS 2010 (beta now). There should be multi monitor support.

Where do I put my Office Add-In configuration page(s)?

I'm writing a COM add-in for Word, Excel and PowerPoint. This add-in has some user-configurable settings (about a page full of them actually... or perhaps even more than a single page). What is the standard way of presenting these to the user? Through a custom page under Tools->Options? (how?) Under a custom button on a custom toolbar? A specific menu for the add-in?
If it were Outlook, I would add a custom property page. I was pretty confident I could easily google something similar for the other office application, but I'm obviously not searching for the right terms. Hints to improve my searching are also very welcome!
Update:
I just realized one can figure from your question you are targeting Office versions up to and including 2003 right now, as for example the tools menu is gone in 2007.
You might still find an answer regarding your question by looking at the starting point for the mentioned migration from 2003 to 2007: access to the settings for the sample 2003 add-in is located in an add-in specific sub menu of the tools menu, as shown in Figure 7.
For current and future versions of Office (i.e. 2007 and up) your first stop regarding user interface questions should be the Office Fluent User Interface Developer Portal, specifically you'll find there the '2007 Office System Document: UI Style Guide for Solutions and Add Ins'.
Its probably worth pointing out that this guide is not on par with the Windows User Experience Interaction Guidelines (UX Guide) by a huge margin, which is unfortunate given the almost traditional friendly competition between the Office team and other Microsoft departments in setting the next de facto UI standard for 3rd party developers.
Still one can figure out initial directions from there, for example the recommendation regarding scenarios for custom task panes as suggested by Gary clearly is at odds with your need to offer user settings, citation:
Create a custom task pane if…
Your solution needs to present data
about a document that is required to
be visible, in a non-modal fashion,
use a custom task pane. [...]
You can find a good starting point regarding your question in section Simple Migration, where the migration of a simple 2003 add-in to the current 2007 release is explored step by step from a UI design perspective; not surprisingly this add-in features settings too, hence your requirements are addressed, albeit only on the side.
Reproducing this section here would be a bit lengthy plus I'm not sure whether it would be legal to reproduce the inline images used there, just look for Figure 9 in particular to get you started.
You can take it further from there depending on your particular scenario, good luck!
I'm pretty sure you cannot add a tab to Word, Excel and PowerPoint's Tools | Options dialog. I know you cannot do that in Word before 2007 at least.
I would recommend adding a menu item for your add-in somewhere, probably under the Tools menu. I assume your add-in does not already have any other menu items? I would put it in a menu item rather than a toolbar button, since most users don't need to change "settings" all the time, so they do need to look at the button on the toolbar all the time. My screen shots here show the menu in Word with Options at the bottom, though not the actual options dialog: http://www.amosfivesix.com/timken-business-stationery
If you're worried about people finding your menu item tucked away on the Tools menu, you can have a window pop-up the first time the app is started after your add-in is installed. Have it show a picture of where the menu item is, or just explain how to get there. Lots of apps have things like that the first time they run. One of my larger Outlook add-ins does have it's own menu on the menu bar (so it's fairly easy to find) but I also have a first run window that explains what/where it is. You can see an example of that here: http://www.amosfivesix.com/timken-electronic-business-card
Gary McGill's idea for a task pane might be good as well. I don't have any experience with task panes. I'm not sure it would be appropriate for "application settings" since taks panes are more like modeless dialogs that you work with while also working with the document content. Changing your add-in's settings probably doesn't work that way.
I don't know if there is a standard way. I have only created VBA add-ins, and I do not believe it is possible to add custom pages under Tools | Options.
In an Excel Add-In I created, I put a 'Settings...' button on the Add-Ins toolbar (the Add-In created a custom toolbar during the _AddInInstall event).
But this approach of course means your add-in must have a custom toolbar (or menu).
I did a quick check on an Office installation I have access to, that has a few Add-Ins:
The Adobe PDFmaker add-in has its own top-level menu, as well as a toolbar. The menu has a 'Change conversion settings' menu item
A custom add-in (eye-share, don't know what it is) also has its own top-level menu. The menu has a 'Settings...' menu item.
Hummingbird (some sort of document management system) has menu items all over the place, but no settings dialog. The installation program probably sets the necessary config values in the registry.
So my conclusion is:
You cannot add a custom page under Tools | Options (I guess Adobe would have done this if possible).
If your add-in has a custom menu or toolbar, add a 'Settings...' button or menu item (don't know if there is a standard icon for this)
If your add-in does not have a custom menu or toolbar, I would probably add a single menu item under Tools.
If you don't want to clutter the Excel interface, you could have an external program (created in .NET or whatever) installed on the Start Menu that updates the registry. This of course requires that all relevant settings can be represented as registry values, and are to be persisted. It also means that the Add-in should always look to the registry for settings values when performing operations - not read the setting at startup and cache it in a variable.

Resources