Tuesday, September 21, 2010
Scripts for IT
Started a blog http://www.scripts4it.com for IT related stuff. Posted some scripts written by me, useful in day-to-day working of System Administrators.
Tuesday, July 13, 2010
How to change qtp license type
Set license type as seat license
HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Rainbow
"LicType"=dword:00000000
Set license type as concurrent license
HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Rainbow
"LicType"=dword:00000001
HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Rainbow
"LicType"=dword:00000000
Set license type as concurrent license
HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Rainbow
"LicType"=dword:00000001
Thursday, May 6, 2010
Cannot start Microsoft Office Outlook, Unable to open the Outlook window
Synopsis: When you open Outlook you get this message and Outlook disappears
"Cannot start Microsoft Office Outlook, Unable to open the Outlook window.
The set of folders could not be opened. The server is not available.
Contact your administrator if this condition persists."
Solution:
1. Click on Start
2. Open Run
3. Type or Copy Pest "Outlook.exe /resetnavpane"
4. Press Enter or Click OK
"Cannot start Microsoft Office Outlook, Unable to open the Outlook window.
The set of folders could not be opened. The server is not available.
Contact your administrator if this condition persists."
Solution:
1. Click on Start
2. Open Run
3. Type or Copy Pest "Outlook.exe /resetnavpane"
4. Press Enter or Click OK
Friday, April 9, 2010
Split a word document into separate files
Here is a macro that can automatically split a large word document into several small ones.
1. Open you word file
2. Go to the View Tab > Macros > View Macro (or press ALT + F8)
3. In the Macro name box, type split
4. Click Create to open the Visual Basic Editor
5. Overwrite the newly created split subroutine with the code below
6. Create a tmp directory in drive c:
7. Run this macro
Sub split()
'
' split Macro
'
'
' Used to set criteria for moving through the document by page.
Application.Browser.Target = wdBrowsePage
For i = 1 To ActiveDocument.BuiltInDocumentProperties("Number of Pages")
'Select and copy the text to the clipboard
ActiveDocument.Bookmarks("\page").Range.Copy
' Open new document to paste the content of the clipboard into.
Documents.Add
Selection.Paste
' Removes the break that is copied at the end of the page, if any.
Selection.TypeBackspace
ChangeFileOpenDirectory "C:\tmp"
DocNum = DocNum + 1
ActiveDocument.SaveAs FileName:="Page_" & DocNum & ".doc"
ActiveDocument.Close
' Move the selection to the next page in the document
Application.Browser.Next
Next i
ActiveDocument.Close savechanges:=wdDoNotSaveChanges
End Sub
1. Open you word file
2. Go to the View Tab > Macros > View Macro (or press ALT + F8)
3. In the Macro name box, type split
4. Click Create to open the Visual Basic Editor
5. Overwrite the newly created split subroutine with the code below
6. Create a tmp directory in drive c:
7. Run this macro
Sub split()
'
' split Macro
'
'
' Used to set criteria for moving through the document by page.
Application.Browser.Target = wdBrowsePage
For i = 1 To ActiveDocument.BuiltInDocumentProperties("Number of Pages")
'Select and copy the text to the clipboard
ActiveDocument.Bookmarks("\page").Range.Copy
' Open new document to paste the content of the clipboard into.
Documents.Add
Selection.Paste
' Removes the break that is copied at the end of the page, if any.
Selection.TypeBackspace
ChangeFileOpenDirectory "C:\tmp"
DocNum = DocNum + 1
ActiveDocument.SaveAs FileName:="Page_" & DocNum & ".doc"
ActiveDocument.Close
' Move the selection to the next page in the document
Application.Browser.Next
Next i
ActiveDocument.Close savechanges:=wdDoNotSaveChanges
End Sub
Subscribe to:
Posts (Atom)