Category Archives: Tweaks

Google Mail and Attachments

3
Filed under Rants, Tweaks

imageJust discovered something incredibly nifty about GoogleMail (GMail).

I’d written a message, and had included the sentence “I’ve attached this document in Word format for your review”.

Unfortunately, I forgot to attach the document.

When I clicked Send, Gmail popped up a messagebox asking me if I’d intended to include an attachment, because I’d written in the email “I’ve attached….”.

Clever stuff. Simple, but clever.

I can’t count how many times having that little feature in Outlook would have saved me from having to respond later with the attachment I meant to send.

It’s little things like that that can make a big difference in app usability. Things like automatically formatting a phone number, or automatically picking a Zip code once the city and state have been entered, or entering the city and state from the Zip code. Or how about a calendar system where, for the date of the appointment, you could enter “2 weeks from monday” and have the system determine the correct date?

VSTO 3 in Visual Studio 2008 under Office 2010

4
Filed under Office, Tweaks

Ok, bit of a weird combination. If you’re developing for Office 2010, you’re using VS2010, right? Uh huh…

Seriously, if you’re like a lot of folks, you might not be upgrading to VS2010 soon, so Microsoft can shake the bugs out in an SP1. But still, you have an Office VSTO addin in VS2008, that you’d like to be able to run in Office 2010, while debugging in the VS IDE.

If you’ve tried this without having Office 2007 installed ALSO along with the Office 2007 Primary Interops, you’ve most likely gotten a nasty message in the errors window telling you you “can’t compile this application because Office 2007 is not installed” or some such.

Well, fear not. With a little tweak to your addin’s project file, you should be good as gravy.

Here’s the untouched section from towards the bottom of a VSTO VBProj file. Notice the nasty line that starts with “VSTO_COMPATIBLEPRODUCTS”.

  <!-- This section defines VSTO properties that describe the host-changeable project properties. -->
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
        <ProjectProperties HostName="Word" HostPackage="{D2B20FF5-A6E5-47E1-90E8-463C6860CB05}" OfficeVersion="12.0" VstxVersion="3.0" ApplicationType="Word" Language="vb" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\12.0\Word\InstallRoot\Path#WINWORD.EXE" DebugInfoCommandLine="/w" AddItemTemplatesGuid="{2606E7C9-5071-4B63-9A83-C66A32B1669F}" />
        <Host Name="Word" IconIndex="0">
          <HostItem Name="MyAddin" Code="Connect.vb" CanonicalName="AddIn" CanActivate="false" IconIndex="1" Blueprint="Connect.Designer.xml" GeneratedCode="Connect.Designer.vb" />
        </Host>
        <ProjectClient>
          <VSTO_CompatibleProducts ErrorProduct="This project requires Microsoft Office Word 2007, but this application is not installed." ErrorPIA="This project references the primary interop assembly for Microsoft Office Word 2007, but this primary interop assembly is not installed.">
            <Product Code="{XX12XXXX-XXXX-XXXX-X000-X000000FF1CE}" Feature="WORDFiles" PIAFeature="WORD_PIA" />
          </VSTO_CompatibleProducts>
        </ProjectClient>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>

The trick, it turns out, is to just comment that element out completely.

You’ll end up with this…

  <!-- This section defines VSTO properties that describe the host-changeable project properties. -->
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
        <ProjectProperties HostName="Word" HostPackage="{D2B20FF5-A6E5-47E1-90E8-463C6860CB05}" OfficeVersion="12.0" VstxVersion="3.0" ApplicationType="Word" Language="vb" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\12.0\Word\InstallRoot\Path#WINWORD.EXE" DebugInfoCommandLine="/w" AddItemTemplatesGuid="{2606E7C9-5071-4B63-9A83-C66A32B1669F}" />
        <Host Name="Word" IconIndex="0">
          <HostItem Name="MyAddin" Code="Connect.vb" CanonicalName="AddIn" CanActivate="false" IconIndex="1" Blueprint="Connect.Designer.xml" GeneratedCode="Connect.Designer.vb" />
        </Host>
        <ProjectClient>
          <!-- BEGIN COMMENTED OUT SECTION -->
          <!-- <VSTO_CompatibleProducts ErrorProduct="This project requires Microsoft Office Word 2007, but this application is not installed." ErrorPIA="This project references the primary interop assembly for Microsoft Office Word 2007, but this primary interop assembly is not installed.">
            <Product Code="{XX12XXXX-XXXX-XXXX-X000-X000000FF1CE}" Feature="WORDFiles" PIAFeature="WORD_PIA" />
          </VSTO_CompatibleProducts>
          END OF COMMENTING -->
        </ProjectClient>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>

Happy VSTOing!

That Annoying “The publisher could not be verified” Prompt In Windows 7

4
Filed under Tweaks, Utilities, Vista, Windows 7

I’ve just finished paving my main machine with Windows 7 64 bit, and was working on tidying up some of the finer points of my installation.

One minor item I use is a batch file with a reference to the excellent Poweroff utility. The batch file basically powers down the monitor, locks the machine, then goes into standby/hibernate mode. I attach it to a Ctrl-f11 hotkey to make it a quick keystroke to powerdown my machine.

Anyway, I have that bat on my path, and I happen to keep it out on a network drive (a NAS array), not on my local machine. I generally keep data off my local machine, preferring to only have program installs and temp files locally.

But when I pointed my shortcut to the network path and hit Ctrl-F11, I’d get that annoying “The publisher could not be verified” prompt. Every time!

Well, a few googles later and I came across this tip on annoyances.com.

It’s for Vista, but it also works in Win 7 (even the 64bit version).

Run gpedit.msc Go to User Configuration >> Administrative Templates >> Windows Components >> Attachment Manager Add "*.exe; *.bat" to the "Inclusion list for moderate risk file types" setting.

I added *.bat to the list, as well as *.exe because, in my case, I keep a number of handy BAT files in folders out on my network drives and then include those folders in my path.

Works a treat. Be sure to read up on why to include this in the Moderate risk element and not the High Risk, though. Generally, if you have a reasonably good firewall/router, making this change should be safe.

Vista Explorer “Helpfulness”

3
Filed under Tweaks, Vista

Working with Vista, I’ve noticed that it tries to be a tad too helpful sometimes. I’ve already posted about it’s proclivity for attempting to AutoTune my network card and in the process, detuning it.

There’s a reason Bob failed, and a reason those annoying “Office assistants” got dumped first thing after installing Office. I suppose I should be thankful there’s no 3D animated wizard bouncing out of the sidebar from time to time to “wave it’s wand” on a window of mine to move it to the monitor that would be “more appropriate”, or whatever.

One annoyance I’ve run into is that Vista tends to just “decide” that I want a particular folder to show in grouped view, or in thumbnail view, even though I’ve gone through the process of turning all that crap off and setting ALL FOLDERS to view in Details mode.

Grrr.

Well, I was just browsing for something completely unrelated and happened upon this posting by MVP Keith Miller about turning off the autodetect view in Explorer.

In it, he describes a reg hack that’ll do just that, turn that feature off.

Here’s the script (you’ll need to save it to a REG file and Right click and select MERGE)

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\All Folders\Shell]
“FolderType”=”NotSpecified”

Before you run it though. Load up RegEdit and check out that Bags key:

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags

If your system is anything like mine, there will be literally HUNDREDS of entries in there.

Make sure you turn off “Remember Each folders settings”, and then Delete the whole Bags key to remove all those “memorized” folder settings you didn’t want to memorize in the first place. No wonder the damn registry balloons faster than Steve Fossett in a hurricane.

image