Saturday, November 20, 2010

How to set up reminder for Subject line in Microsoft Outlook

Forgot to mention subject in mail??? You always keep the subject line of email to the last, and sent a very important detailed mail without the subject line. A mail without a subject line brings a bad impression on us. There is some precaution you can take against this if you are using "Microsoft Outlook". The following vbscript will add a simple reminder that checks whether subject blank and prompts reminder text.

Follow the simple steps mentioned below.

1. Open your Outlook,

2. Opens the Visual Basic Editor (Alt+F11) and open Project-Project 1 (left side). If this doesn’t open Project-Project 1, then Press Ctrl+R.

3. On the Left Pane, you can see "Microsoft Outlook Objects" or "Project1", expand this. Now one can see the ThisOutLookSession

4. Double click on ThisOutLookSession. It will open up a Code Pane on the right hand side.

5. Copy and Paste the following code in the right pane (Code Pane) and save it

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim strSubject As String

strSubject = Item.Subject

If Len(Trim(strSubject)) = 0 Then

Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"

If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo 
Then
Cancel = True

End If

End If

End Sub

6. Now whenever you try to send a mail without subject, a pop-up is raised to remind you of the blank subject.


Please suggest better methods if you know. Please notify if it is not working for you.

    

Monday, November 8, 2010

Drive is not accessible The parameters are incorrect

Problem:

Drive not accessible and giving the following error.
Parameter is incorrect

Symptoms:

Cannot open logical drive in Windows operating system using explorer or using command prompt.

Reason:

Due to bad sector in HDD

Possible solution:

CHKDSK E: /F /R /X

If you know any other reason or solution please comment or email.

Spoiler Alert

Check disk on and fixing errors on the fly is going to take a lot lot of time. Our friend Sushil's system took more than 13 hours to do it. So readers, you will need to find some other way to entertain yourself when a CHKDSK command is running.

Saturday, July 17, 2010

How to export Oracle database using windows batch file with auto file name

Hi folks, this tip is for the DBA's and developers who do the tedious task - Daily back up of database!!! Every day run a script to export oracle database.Each day you would have to modify your export batch file with the current date and to do it. I thought of creating a batch file that accepts the user name and password and then exports the database and creates a dump file with auto filename. You will get a new dump file each day,with the date appended in the file name. No need of manually giving the date.

Copy paste the below code to create a batch file (*.bat)

cls
@echo off
REM Export Full database with auto filename for dump and log
REM This batch file will create the dump and log files in the same directory as of batch
REM File name syntax --> <SCHEMANAME>_<DD>_<MM>_<YYYY>
REM Author: Deepu Mohan Puthrote, http://deepumohan.com
REM Created:  07-Sep-2009
REM Modified: 30-Sep-2009, 01-Oct-2009

REM Get user credentials
set /p schema=Enter username: 
set /p pwd=Enter password: 
set /p sid=SID: 

REM Following block is for getting the year, month and day
REM ======================================================
   FOR /f "tokens=2-4 skip=1 delims=(-)" %%G IN ('echo.^|date') DO (
      FOR /f "tokens=2 delims= " %%A IN ('date /t') DO (
         SET v_first=%%G
         SET v_second=%%H
         SET v_third=%%I
         SET v_all=%%A
      )
   )

      SET %v_first%=%v_all:~0,2%
      SET %v_second%=%v_all:~3,2%
      SET %v_third%=%v_all:~6,4%
REM =====================================================

exp %schema%/%pwd%@%sid% FILE=%user%_%dd%_%mm%_%yy%.dmp log=%user%_%dd%_%mm%_%yy%.log
compress=N rows=Y grants=Y buffer=500000 FULL=Y statistics=NONE

pause
If there is any issue, suggestion or feedback please put it in comments. Share it if you liked!

Monday, January 4, 2010

Goo.gl - Google's URL Shortner

Google has launched a new URL shortener service, with which you can shorten long URL's for easy sharing, in blogs, tweets, emails, chats and so on. For using Goo.gl you must be using one of the Google services, like Google wave or Feedburner. There is no front end for using Goo.gl directly like we have in bit.ly and like so services.
For example if you are using Feedburner-->Publicize-->Socialize service, there is option to add a twitter account to your feeds. The URL's in your feeds will be indirectly shortened by Goo.gl while posting to Twitter account.
I have added this blog to my Feedburner account and socialized it via twitter.
http://twitter.com/deepumohanp this is my twitter account, you could see some URL's with 'http://goo.gl' in it. Those URL's are automatically shortened by Goo.gl and then posted to twitter from Google Feedburner.
There an option for using Goo.gl using extensions in Google chrome browser. There in no official release as on 04 Jan 2010. Use this link https://chrome.google.com/extensions/search?q=goo.gl to get a set of Google Chrome extensions that used goo.gl. I am using

goo.gl shortener + share on twitter and is happy with it. Try and explore on all extensions and find yours.

Have nice time.
Related Posts Plugin for WordPress, Blogger...