Now you can Twitter from Outlook too

February 12, 2009JP2 CommentsRate This ArticlenewLinks to this article


    I ported the Post To Twitter Excel add-in over to Outlook, so you can use it in Outlook as well.

    All I had to do was export the Excel modules and import them into Outlook's VBIDE, with no modification whatsoever. :D

    Ok, I did make one slight change. I moved the code that enables the tweet button to the Change event, instead of the AfterUpdate event. But I was planning to do that with the Excel version of the code anyway.

    Note that this is a low-fi version of other tools such as OutTwit, which are probably written in VSTO and actually integrate with Outlook.

    » Download Twitter From Outlook «

    After downloading the file, unzip and import both .bas files and the .frm file into your Outlook VBIDE as follows.

  1. Start Microsoft Outlook
  2. Press Alt-F11 to open the VBIDE
  3. Press Ctrl-M and browse to the folder where you unzipped the archive.
  4. Select the modStart.bas file and click Open
  5. Press Ctrl-M again and open the modTweet.bas file.
  6. Press Ctrl-M again and open the frmTwitter.frm file. (leave the .frx file alone)
  7. Press Alt-Q to close the VBIDE.

    Press Alt-F8 and run the AddButton macro to create a toolbar button with the macro that opens the form attached to it. You can delete the AddButton macro after that, if you like, and you can also delete the files from the zip archive you opened. Now on the Advanced toolbar, you should see a new button: Post To Twitter. Click it and you'll get the exact same screen as in Excel.

posttotwitter

    » Download Twitter From Outlook «

About JP
I'm just an average guy who writes VBA code for a living. This is my personal blog. Excel and Outlook are my thing, with a sprinkle of Access and Word here and there. Follow this space if you want to learn more about VBA. Keep Reading »

↑ Scroll to top
Previous Post:

Next Post:

2 Response(s) to Now you can Twitter from Outlook too ↓

  1. Leonel Q. says:

    JP:

    I've just downloaded this add-in and it works (almost) perfect. The only problem I have is when I use accents. The API (or the add-in, I don't know) kind of truncates the word where the accent appears. For example:
    I twitted this:
    "Test para saber por qué la API cortó inútilmente mis párrafos."

    Twitter showed:
    "Test para saber por quéa API cortóúente mis páafos."

    I wonder if you could fix it.

    Regards.

    • JP says:

      My guess is that you need to use an array of accented characters, then check the passed string for them and replace them with their Chr equivalents. For example "é" is Chr(233).

Speak Your Mind

Tell us what you're thinking...

Certain comments (including first-time comments) are subject to moderation and will not appear immediately. Please view the Comment Policy for more information. To post VBA code in your comment, use tags like this: [cc lang='vb']Code goes here[/cc].




Site last updated August 24, 2010 @ 5:56 pm