Tuesday, June 27, 2017

Speak any Text

Example to create Speak vbs file.

Set voice = CreateObject("SAPI.SpVoice")
voice.Rate = 1
voice.Volume = 90
Say = InputBox("Say Something", "Say Something", "Hey !! how is going on...")
If (Len(Say) > 0) Then
    voice.Speak Say
End If


Thursday, June 15, 2017

Pen drive show empty even when data exists

A friend of my have problem with his pen drive, he was not able to see any folders or file even data was there. He scan with antivirus but no virus detected.
Use following command to see if folders or files got hidden somehow...

1) Go to command prompt using "cmd" command 
2) Type command "attrib -h -r -s /s /d e:\*.*"

Note: "e:" is the pendrive folder.

Wait for few seconds, and you will get your files and folder visible.

Monday, April 24, 2017

What the 'Win' Key Does - Shortcuts!

You might think that the little windows or ‘win’ key  on your keyboard only has one function – to bring up the start menu – but it in fact can be used in conjunction with other keys for a vast number of simple shortcuts. These ‘win’ key  shortcuts will save you those precious minutes and help you perform tasks you never knew you could with your PC.
Enjoy the following listed shortcuts, according to alphabetical order.


  1. Win — opens the Start Menu (but in Windows 8.1 it opens the previous window)
  2. Win + A — opens Windows 10’s Action Center
  3. Win + B — chooses the first icon in the Notification Area (then use the arrow keys to switch icons)
  4. Win + Ctrl + B — switches to a new message in the Notification Area
  5. Win + C —brings up the Charm Bar (in Windows 8 and 8.1). In Windows 10 it opens Cortana
  6. Win + D — shows the desktop and minimizes all windows
  7. Win + E — opens Windows Explorer. In Windows 10 opens Quick Launch
  8. Win + F — starts ’Find files and folders’
  9. Win + Ctrl + F — opens ’Find computers’
  10. Win + G — brings all gadgets to the foreground (in Windows 7 and Vista); opens Windows 10’s Game bar
  11. Win + K — opens a new Start menu (only Windows 8 and 8.1)
  12. Win + L — changes user or can lock the workstation
  13. Win + M — minimizes all your windows
  14. Win +  Shift + M — restores windows that have been minimized
  15. Win + O — locks device orientation (and disables gyroscope function on tablets);
  16. Win + P — switches operating modes to an outside monitor or projector
  17. Win + Q — opens Search charm for installed apps (in Windows 8)
  18. Win + R — opens the ’Run dialog’ box
  19. Win + T — opens the Taskbar
  20. Win + U — opens the Utility Manager
  21. Win + W — opens Windows Ink Workspace
  22. Win + X — opens the Windows Mobile Application Center (only mobile computers in Windows Vista and 7);
  23. Win + Y — starts Yahoo! Messenger
  24. Win + Pause — opens My Computer
  25. Win + F1 — opens Windows Help
  26. Win + 1 ... 0 — runs or switches to the program pinned to the Taskbar with a specific sequence number 
  27. Win +  Shift + 1 ... 0 — starts a new program pinned to the Taskbar with a specific sequence number 
  28. Win + Ctrl + 1 ... 0 — switches to the last active window of the program that’s pinned to the Taskbar with the specific sequence number 
  29. Win + Alt +1 ... 0 — opens the transitions list for the program pinned to the Taskbar with the specific sequence number 
  30. Win + ↑ — maximizes the active window
  31. Win + ↓ — restores the default window size or minimizes active windows
  32. Win + ← or → — switches the window deployment mode
  33. Win +  Shift + ← or → — switches a window between monitors in multi-monitor set-ups 
  34. Win +  Shift + ↑ or ↓ — stretches the active window from the top to the bottom of the screen and restores the window size
  35. Win + Home — minimizes or restores all non-closed windows, except active ones (only Windows 7), goes to the top of the web page
  36. Win + Space — looks at the desktop (only Windows 7). Changes the layout (only Windows 8 and 10)
  37. Win + + — activates the Magnifier Utility or zooms the image by 100%
  38. Win + — — if the Magnifier Utility is active, the image is reduced by 100%
  39. Win + Esc — disables the Magnifier Utility
Fill free to add more shortcuts, I know there are many more !!

Tuesday, April 18, 2017

Set Password to multiple Excel file in current and subfolder

' Code to add Password to Excel file.
' Note: This will set password to non-password without prompting, but the file already have the password will get prompt to enter old password before it set new one.

Public Sub addPassword()
    Dim FSO As Object
    Dim folder As Object, subfolder As Object
    Dim wb As Object

    Set FSO = CreateObject("Scripting.FileSystemObject")
    folderPath = ActiveSheet.Range("A1").Value ' you can hardcore the path or put it in the cell
    pwd = ActiveSheet.Range("B1").Value ' you can hardcore the password or put it in the cell

    Set folder = FSO.GetFolder(folderPath)
    
    With Application
        .DisplayAlerts = False
        .ScreenUpdating = False
        .EnableEvents = False
        .AskToUpdateLinks = False
    End With
    
' loop to get root files of the mention folder path..

    For Each wb In folder.Files
        If Right(wb.Name, 3) = "xls" Or Right(wb.Name, 4) = "xlsx" Or Right(wb.Name, 4) = "xlsm" Then
            Set masterWB = Workbooks.Open(wb)
            ActiveWorkbook.SaveAs Filename:=Application.ActiveWorkbook.FullName, Password:=pwd
            ActiveWorkbook.Close True
        End If
    Next

' following loop is used to get files from "n" numbers of subfolders... 

    For Each subfolder In folder.SubFolders
        For Each wb In subfolder.Files
            If Right(wb.Name, 3) = "xls" Or Right(wb.Name, 4) = "xlsx" Or Right(wb.Name, 4) = "xlsm" Then
                Set masterWB = Workbooks.Open(wb)
                ActiveWorkbook.SaveAs Filename:=Application.ActiveWorkbook.FullName, Password:=pwd
                ActiveWorkbook.Close True
            End If
        Next
    Next
    With Application
        .DisplayAlerts = True
        .ScreenUpdating = True
        .EnableEvents = True
        .AskToUpdateLinks = True
    End With
End Sub


Thursday, April 13, 2017

Fix Out of Sync Audio in VLC with a Keyboard Shortcut

I was watching movie, on VLC player,  and there was problem with video and voice sync. I have found some shortcut on internet that fix my problem, and here I am sharing with you too.

A very simple keyboard shortcuts to fix this problem. While you're watching the video, just press the J or K keys to move the audio back or forward 50 milliseconds, respectively. Quick, easy, and no advanced fiddling required.

Wednesday, March 1, 2017

Add Notepad Application to the Windows Desktop Right-Click Menu

Copy following lines into notepad and save with .reg extension


Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Notepad]
[HKEY_CLASSES_ROOT\Directory\Background\shell\Notepad\command]
@="\"C:\\Windows\\System32\\notepad.exe\""


Thursday, October 13, 2016

Happiness Quotes!

Received in mail from a friend and want to add it in my blog, Credit got to writer.

Happiness is a mental or emotional state of well-being characterized by positive or pleasant emotions ranging from contentment to intense joy.


  • “People are just as happy as they make up their minds to be.”
  • “I'm choosing happiness over suffering, I know I am. I'm making space for the unknown future to fill up my life with yet-to-come surprises.”
  • “Happiness is not the absence of problems, it's the ability to deal with them.”
  • We become more successful when we are happier and more positive.
  • The grand essentials to happiness in this life are something to do, something to love, and something to hope for.
  • Only one thing has to change for us to know happiness in our lives:  where we focus our attention.
  • We learn the inner secret of happiness when we learn to direct our inner drives,  our interest and our attention to something outside ourselves.
  • Now and then it's good to pause in our pursuit of happiness and just be happy.
  • Happiness belongs to the self-sufficient.
  • Happiness is the meaning and the purpose of life, the whole aim and end of human existence.
  • Tell me what you feel in your room when the full moon is shining upon you  and your lamp is dying out, and I will tell you how old you are, and I shall know if you are happy.
  • Happiness is living by inner purpose, not by outer pressures.
  • Every gift from a friend is a wish for your happiness.
  • It’s a helluva start, being able to recognize what makes you happy.
  • The secret of happiness is not in doing what one likes, but in liking what one does.
  • There are short-cuts to happiness, and dancing is one of them.
  • The art of being happy lies in the power of extracting happiness from common things.
  • While we are focusing on fear, worry, or hate, it is not possible for us to be experiencing happiness, enthusiasm or love.
  • Happiness is good health and a bad memory.
  • To be happy, drop the words 'if only' and substitute instead the words 'next time'.
  • It is only possible to live happily ever after on a day to day basis.
  • Growth itself has the germ of happiness.
  • Delight in mediation and solitude. Compose yourself, be happy. You are a seeker.
  • Happiness comes when your work and words are of benefit to yourself and others.
  • May everyone be happy and safe, and may their hearts be filled with joy.
  • To enjoy good health, to bring true happiness to one’s family, to bring peace to all, one must first discipline and control one’s own mind. If a man can control his mind  he can find the way to Enlightenment, and all wisdom and virtue will naturally come to him.