I have just come across the need to create an Excel workbook from a MS Word macro. I have simplified this code for the blog to simply move all text from Word into a new Excel workbook. This will provide a solid starting point for future use.
Option Explicit
Public Sub FormatInExcel()
On Error GoTo Err_Handler
Dim oXL As Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
Dim oRng As Excel.Range
Dim oDoc As Object
Set oDoc = ThisDocument
‘ Start Excel and get Application object.
Set oXL = CreateObject(“Excel.Application”)
oXL.Visible = True
‘ Get a new workbook.
Set oWB = oXL.Workbooks.Add
Set oSheet = oWB.ActiveSheet
‘ Do work
oDoc.ActiveWindow.Selection.WholeStory
oDoc.ActiveWindow.Selection.Copy
oSheet.Range(“A1″).PasteSpecial xlPasteValues
‘ Release object references.
Set oRng = Nothing
Set oSheet = Nothing
Set oWB = Nothing
Set oXL = Nothing
Set oDoc = Nothing
Exit Sub
Err_Handler:
MsgBox Err.Description, vbCritical, “Error: ” & Err.Number
End Sub
Happy coding!
I have made a discovery this morning while attempting to configure two ASP.NET Virtual Directories on one Web Site Server.
The server houses IIS6 and is hosting several web applications for our QA group. IIS is responsible for hosting our ScrewTurn Wiki and an internal metrics gathering tool. The Wiki was built using the .NET Framework version 2 and the Metrics site using the .NET framework version 4. It turns out that if one web site is hosting two virtual directories, that ALL virtual directories for that site MUST use the same version of the .NET Framework.
To solve our issue, I created a seperate Web Site in IIS, running on a seperate port, to run our wiki site.
During our troubleshooting, we discovered this page and found it extremely useful as well: http://neilkilbride.blogspot.com/2008/02/windows-2003-iis-returns-404-for-aspnet.html
I was recently looking for a way to enjoy Divx-encoded videos on my Zune — you know for road trips and such. Apparently some work has been done in this field, yet I have had little success in duplicating the effort.
The folks over at Techmixer.com have suggested the following steps:
- Copy and paste the following lines into a text edit program and save it under .reg extension.
Windows Registry Editor Version5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\Zune\Extensions\.avi]
“Extension.Handler”=”Microsoft.Zune.1.AVI””MediaType.Description”=”Video Clip”
“MediaType.Icon”=”C:\\Program Files\\Zune\\ZuneLoc.dll,-736?”Extension.MIME”=”video/avi””AlreadyRegistered”=”no”
“Runtime”=dword:00000007?PerceivedType”=”video”
“Permissions”=dword:0000000f
“UserApprovedOwning”=”no”
@=””
- Double-click the newly .reg file and the register information will be added to your registry.
- Restart Computer
- After restart, you start dragging your divx movies using Zune software into your zune player. The files will synced with Zune devices and force the zune software to convert the files.
You may have to locate a file called “zuneloc.dll” for this to work too…
It is important to note that your mileage may vary with this and to proceed at your own risk. You will be mucking around in the registry, which can do serious harm to your computer. And, I’ve not tried this out yet, so be warned… I am just passing along what information I have found so far.
I was reading Griner’s Blog over at TheSocialPath.com and his latest post had an interesting image of a graph the blog. Of course, I got curious and decided to graph out my blog using this cool web page graphing site:
Webpages as Graphs

I am not sure what exactly it all means, but it sure looks purty.
In my recent testing efforts, I have comes across a desktop windows form (written in VB6) involving updating a data grid and then calculating another field’s value based on those updates. In order to achieve this functionality, the development staffs implemented two events (AfterColUpdate and LostFocus) that, when triggered, would fire off the calculation method.
None of this is obvious to the end user when testing, all they see is enter a number into the grid column and the total field automatically updates with the sum of all values in the column. Easy peasy.
I created my reusuable action in QuickTest Pro and record the entering of data, which yielded the following code:
VbWindow(“frmMain”).VbWindow(“frmChildWindow1″).VbWindow(“frmChildWindow2″).AcxTable(“PaymentGrid”).SelectCell 1,4
VbWindow(“frmMain”).VbWindow(“frmChildWindow1″).VbWindow(“frmChildWindow2″).AcxTable(“PaymentGrid”).SetCellData 1,4, “30.00″
Continue reading Updating ActiveX Datagrids in QTP
Using QTP to Connect to an Oracle Database with Instant Client
by Geoffrey Rodgers
Need a light-weight ODBC connection to an Oracle database for you QTP scripts? Oracle Instant Client is just the ticket, assuming you have Oracle version 10g for your database. Please read the information provided by Oracle to make sure Instant Client is right for your needs.
The Instant Client Driver
I’m not going to rewrite everything provided by Oracle, but I will quickly say (for those of you that did not click on the above link) that Instant Client is a very quick installation and contains less overhead than the full client software that was previously required to connect to an Oracle database using something other than the Microsoft ODBC for Oracle driver.
Instant Client Driver Setup:
Continue reading Using QTP to Connect to an Oracle Database with Instant Client
When creating reusable actions in QuickTest Pro, there are times you may come across the need to dynamically access an object within your application that may or may not exist within your Object Repository. One approach to handling this opportunity is through the use of Description Objects.
I could spend a lot of time attempting to explain how to go about implementing description objects, but I have found that QTP’s help files do a good job explaining exactly what you need to do. To find what you are looking for, search for “Using Description Objects for Programmatic Descriptions” within the help file.
Continue reading Description Objects
Recently, I have had to install a named instance of SQL Server 2005 along side a default instance of SQL Server 2000. The 2000 server had the following collation configured: SQL_Latin1_General_CP1_CI_AS. For testing purposes, we had to make sure the new instance had the same collation setting.
Continue reading Selecting “SQL_Latin1_General_CP1_CI_AS” Collation in SQL Server
If you want to determine the Collation setting for a particular database in SQL Server:
- Open Query Analyzer (or SQL Management Studio)
- Select your database
- Execute the following query:
SELECT DATABASEPROPERTYEX(db_name(), 'Collation') SQLCollation;
Hope this helps.
I have needed to check my SQL Server Collation settings recently. Here is a SQL Query to find your server’s collation setting.
SELECT SERVERPROPERTY('Collation') AS 'Collation'
Hope this helps.