Skip to main content.
July 8th, 2008

Fixing RDO Error (Exchange) When Trying to Move an Email

I’m using Python win32 stuff to automate some Exchange tasks. This is an issue I ran into.

Here’s my one-way email correspondence with the authors that lists the error and how I fixed it:

This turned out to be a permissions issue. Sorry for the bother.

-Greg

—–Original Message—–
From: Greg Pinero
Sent: Tuesday, July 08, 2008 11:02 AM
To: redemption@di….com
Subject: Outlook Redemption Question

Hi there,

I’m trying to use the RDOMail object’s Move method:

Move(DestFolder)
Moves message to a new folder.
DestFolder - The destination folder (RDOFolder object).
Returns the new message (RDOMail object) in the destination folder.

However I am getting this error:

Traceback (most recent call last):
File ““, line 1, in ?
File “>”, line 2, in Move
com_error: (-2147352567, ‘Exception occurred.’, (0, ‘Redemption.RDOMail’, ‘Error in IMAPITable.FindRow(PR_SEARCH_KEY): MAPI_E_NOT_FOUND’, None, 0, -2147221233), None)

I’m simply calling e.Move(rdoFolder)

Where e is an email message and rdoFolder is an RDO folder of the folder I want to move the message to. Let me know if it would help to see my code.

Thanks in advance for the help.

Greg Pinero

Posted by Greg Pinero (Primary Searcher) as win32, Python, Other at 11:26 AM MST

No Comments »

January 23rd, 2008

How to Send an Outlook Email with VBA (Macros)

Here’s an example of a simple macro that sends an Outlook email.

Sub sl()
    Dim olApp As Outlook.Application
    Dim objMail As Outlook.MailItem
    Set olApp = Outlook.Application
    Set objMail = olApp.CreateItem(olMailItem)
    objMail.BodyFormat = olFormatPlain
    objMail.Subject = "Hi buddy"
    objMail.Body = "Whats up" + Chr(13) + Chr(10) + "Greg"
    objMail.To = "goofus@doofus.com"
    objMail.Send
End Sub

Posted by Greg Pinero (Primary Searcher) as win32, Other at 1:51 PM MST

8 Comments »

October 12th, 2007

SQL Server - How to Get the Owner of a Table

I find the stored procedure sp_table_privileges [table name] works best.

One of the fields it returns is table owner. Yay!

Here is the full documentation for it.

Here are all my search queries:

  1. sql server find owner of table
  2. tsql + (find OR get) + object owner -change
  3. mssql find object owner

Posted by Greg Pinero (Primary Searcher) as win32, SQL at 11:44 AM MST

1 Comment »

September 13th, 2007

A Fix for When All Your Firefox Extensions Die

Enthusiast Answer My Searches reader, Jody writes in with this Firefox tip:

For some absurd reason (I believe PDF downloader - now incompatible with Firefox 2.0.0.6) all of my Firefox extensions stopped working. Upon opening the add-ons screen, every extension said “This add-on will be installed when Firefox is restarted.”

The simple solution is to close Firefox, and delete the following file. Everything should be fine after that. C:\Documents and Settings\[windows user]\Application Data\Mozilla\Firefox\Profiles\[PROFILE NAME]\extensions.cache

Thanks for the tip, Jody!

Posted by Greg Pinero (Primary Searcher) as win32, Firefox at 4:42 PM MST

Comments Off

August 12th, 2007

How to Make a Beep Sound in Linux and a Fun Program that Uses it

I came across my first Python script using Tkinter tonight while looking through old files. It creates a big screen where you can click anywhere on it and it makes your computer beep. Your Y position controls the frequency and your X position controls the duration.

Well, I wanted to give it a run for old time’s sake, but alas:
ImportError: No module named winsound (On Linux)

So I looked up the problem and decided to go with the beep package installed by running:
sudo apt-get install beep

Then I updated my script to run on both Windows and Linux. Enjoy*:

#!usr/bin/env/python

from Tkinter import *

try:
    import winsound
except ImportError:
    import os
    def playsound(frequency,duration):
        #apt-get install beep
        os.system('beep -f %s -l %s' % (frequency,duration))
else:
    def playsound(frequency,duration):
        winsound.Beep(frequency,duration)

root = Tk()
def callback(event):
    print "clicked at", event.x, event.y
    frequency=event.y * 6
    duration=event.x/2
    print "Freq= ", frequency, "HZ"
    print "duration=",duration, "ms"
    print ""
    if (frequency < 32000) and (frequency>40):
        playsound(frequency,duration)

frame = Frame(root, width=1000, height=800)
frame.bind(”<Button-1>”, callback)
frame.pack()
#message=Label(frame)
root.mainloop()

* Or annoy those near you …

Posted by Greg Pinero (Primary Searcher) as win32, Python, Ubuntu at 11:14 PM MST

Comments Off

« Previous Entries