Friday, November 28, 2008

New Blog - Linux Training

I've just launched a new blog which will contain lessons in Linux. If you are interested in taking a peek at it, here is the site:

http://mwalinu-linuxtraining.blogspot.com

Thursday, November 27, 2008

Adding a DSN to a Machine using Visual Basic .NET Code




Click the link to download the GUI version of the source code for this post

Click the link to download the Console version of the source code for this post

Licensing and Warranty

You may use the code as you wish - it may be used in commercial or other applications, and it may be redistributed and modified. The code is provided "as-is". No claim of suitability, guarantee, or any warranty whatsoever is provided. By downloading the code, you agree to defend, indemnify, and hold harmless the Author and the Publisher from and against any claims, suits, losses, damages, liabilities, costs, and expenses (including reasonable legal or attorneys' fees) resulting from or relating to any use of the code by you.




While it is relatively simple to manually add a DSN to a machine, you may have a project where you have to automatically add a DSN to a machine. For example, I was working on a PC-based application project (including the setup and deployment package) that used a DSN on the user's PC to connect to the data source. My user base wasn't the most technically savvy bunch, so I wanted to make their user experience easier by automatically creating the DSN for them. Using .NET, you can create a program that will automatically create a DSN on a machine.

I have two sample versions of this application. The first sample is using a GUI application to perform the process. The second sample is using a console application to perform the process. You can download one or both of these samples by clicking on the links at the top of the post. I also published an instructional document on Scribd that you may also use for your reference.

Enjoy!

Wednesday, November 26, 2008

Happy Thanksgiving!

I want to wish all of the readers in the States a Happy Thanksgiving!

In the spirit of Thanksgiving, here is a hilarious clip (posted by crystalcheats) from the Thanksgiving episode of WKRP in Cincinnati:

How To Add Third-Party Widgets to Your SharePoint Site



Digg!


Here is an example of a SharePoint site using third-party widgets. The widgets on the right are the Google Map and the Yahoo! Map widgets. The one in the center (left) is one that plays the Peanut Butter Jelly Time video.


Web widgets are useful pieces of code that will allow you to "jazz up" your site without having to compile or use your own code. For example, on one of the sites at work that I had to develop, I'm using the Mapquest widget to allow the users to easily get driving directions. Yahoo! and Google also have some useful widgets that you can use as well.

You can easily embed the widgets on your web page, social networking page, or blog, and by using the Content Editor Web Part, you can use these widgets on your SharePoint 2007 site as well.

I've recently published (on Scribd) step-by-step instructions on how to add third-party widgets to your SharePoint site. You can click on the link below for the directions.



Enjoy!

P.S. to the developers who are reading this: You're probably champing at the bit to write some code to interact with SharePoint. I haven't forgotten about you! I will be featuring more examples of interacting with SharePoint using code over the next few weeks.

Tuesday, November 25, 2008

How to Copy a List on SharePoint 2007 From One Site to Another Site Using Existing SharePoint Functionality


Digg!


If you work in SharePoint 2007, you may have to copy or move a list from one site to another site for one reason or another. For example, you may have to move a list from one site to another, or a site administrator likes the looks of how a list was created on another site and s/he would like to have that list for his or her own data without having to recreate the list manually.

While you can copy or move the lists programmatically, it may take some time to do. Using SharePoint's existing functionality, you can copy or move a list from one site to another site without having to write a line of code.

I've recently published (on Scribd) step-by-step instructions on how to copy a list using SharePoint's existing functionality. You can click on the link below for the directions.



Enjoy!

Sunday, November 23, 2008

My Whitepaper "Number Systems in Computers" Makes the Scribd Hot List

Yesterday, my whitepaper Number Systems in Computers made the Scribd hotlist! The whitepaper is a tutorial on interpreting the number systems used in computers (decimal, hexadecimal and binary).

If you're interested in reading the document, here it is:
Number Systems in Computers

Wednesday, November 19, 2008

SharePoint Development - The Essential Tool Set


Digg!



Please make sure that you install the SharePoint Extensions for your Visual Studio environment.
Extensions for Visual Studio 2005
Extensions for Visual Studio 2008

For a reference to the SharePoint Class Library: MSDN on Microsoft.SharePoint


People who know how to develop in .NET (particularly C# and ASP.NET) already know the foundations for developing for SharePoint 2007. All you need to know is the classes that SharePoint uses, how to access data on SharePoint through your code using GUIDs, and if you are also the SharePoint administrator, how to configure SharePoint to use the custom code by referencing the assembly information.

So how the @#&$% does the developer get the GUIDs and the assembly information?


Note
Before beginning your development project, check out the CodePlex site. CodePlex is Microsoft's open source community. There are numerous tools on this site available for your use, and someone may have already written a tool or web part that you may have to develop.


There are a number of tools that I use to assist me with my SharePoint development. All of these tools that I use are not only free to use, but the majority of the tools are endorsed by Microsoft (the manufacturers of SharePoint and .NET).


  • Stramit Caml Viewer
    Site for Caml Viewer
    Written by Renauld Comte, this robust tool not only gives you information about list and view GUIDs, but it also generates CAML queries for you. So if your application is using CAML queries to get the information, this tool saves you a boatload of time because it not only generates the XML for the CAML query, it also generates the StringBuilder logic for creating the XML for the CAML query!

  • A Simple GUID Picker
    Site for the GUI Picker
    Written by Ronalus, this tool allows you to get the GUIDs for the lists and views on a SharePoint site. This tool is simple yet useful. I use this tool when I'm doing reporting using SharePoint data and SQL Reporting Services since you need to know the list and view GUIDs to connect to the SharePoint "data source".

  • Reflector
    Site for Reflector tool
    Originally written by Lutz Roeder and maintained by Red Gate, this tool is essential for development. This tool returns the assembly information for a class library (dll). All you have to do is drag and drop the dll into the tool, and it will return the information for you, including the assembly information (which is needed for configuring the SharePoint server to use your custom web part or program) and the classes that are part of the library.

    If you have Windows Media player, you can see it in action in this video.

  • Warmup Server
    Download Warmup Server
    Ideally, you want to create a virtual environment in order to do your SharePoint development. If you develop in a virtual environment, then this is the tool for you. This tool allows you to create a MOSS 2007 VPC (Virtual PC) image that you can use. Here is the tutorial on using this tool. I haven't tried it since in my environment, we actually have physical machines that we work from, although I am leaning toward setting up virtual environments for my development.

  • SharePoint Spy
    Site for SharePoint Spy
    Written by Echo Technologies, this free tool will allow you to look at the internal data on a SharePoint site and compare the effects of making a change without changing the actual data. This tool is really helpful if you are writing a program that is manipulating data on a SharePoint list, and you don't want to have to change the data each time. You can also use this tool to compare settings between sites, views and lists to help troubleshoot configuration problems.

Tuesday, November 18, 2008

Oh brother...another 419 scam



The 419 scam is also known as the Nigerian Letter Fraud and the Advance Fee Fraud. This posting from the FBI discusses this and other common e-mail fraud schemes.

Here we go again...

Yesterday I received a letter via e-mail from a sad sack called Mrs. Susan Morgan. Basically, she's a wealthy widow who lives in Kuwait (with an e-mail address from Yahoo! China and a mailing address from the Ivory Coast{Côte d'Ivoire}), and she's a born-again Christian. Apparently she's dying, and she has no heirs except her late husband's relatives. She doesn't want to leave the money to the late husband's relatives because they're heathens (my words, not hers). Well, it's my lucky day! She wants to leave her money to me (she thinks I'm a church) because she knows that I'll use it for Christian causes.

Scam baiting is a way that people try to scam the scammer by pretending to be a victim in order to waste the scammer's time or to gather information about the scammer so legal action can be taken.

The site 419 Eater contains accounts of people who engaged in scam baiting. Dateline NBC on US network NBC has done investigative pieces on Advance Fee Frauds by performing scam baiting.


I would think that by now, people would realize that these e-mails are ludicrous and they would either disregard the e-mails or (if they're in a playful mood) engage in a little scam baiting. Unfortunately, there are still people who let their greed override their common sense, as demonstrated in this recent story about a woman who lost $400,000 to scammers.

Why am I discussing this on a technical education blog? As an IT professional, you may have to play the role as "police officer" to your company's IT resources. In that role, one of your job duties will be to warn your user base of viruses, security threats, hoaxes, and e-mail scams. It may seem like it's a waste of time to send warnings about e-mail scams to your user base because most people would realize it's a scam, but the warnings are for those who will throw common sense out the window for an imaginary chance at the big prize.

Although you are doing someone a favor by warning them about potentially losing their money, you are actually practicing due diligence for protecting your company's IT infrastructure. Someone who's corresponding with these scammers (whether the person is making serious inquiries or if the person is scam baiting) using your company resources can put your infrastructure at risk since SMTP requests are traceable.

Note: When you tell your users to ignore the "advance fee fraud" e-mails, also tell your users not to engage in scam baiting using the company's resources. You don't want your servers and network clogged with traffic not related to work.

Saturday, November 8, 2008

Scribd - YouTube for Published Documents



A few months ago, I stumbled upon Scribd (http://www.scribd.com), a site where authors can publish their writings. I found it in a roundabout way, actually.

I wasn't looking for a way to publish my documents (I have two web servers where I can house my documents, and I have Google Docs on my Google account) - I was looking for an essay on network security, and the search engine brought me to Scribd. Once I was there, Scribd piqued my interest.

General Information About the Company


Scribd was founded in 2006 by Trip Adler, Jared Friedman, and Tikhon Bernstam on a budget of a mere $12,000. As of 2008, they have received over $3 million dollars in funding. Scribd's mission was to provide a way for people (primarily authors) to host shared documents on the web. Scribd also partners with publishing companies so publishers can use the site for publishing content.

iPaper


In 2008, Scribd launched iPaper, a Flash-based interface which allows a user to embed documents in webpages and blogs. For example, if you have a website or blog and you don't want the reader to exit your site, you can embed the document in your webpage or blog page (like you can with YouTube). Scribd also launched an API that developers can use to implement the functionality in the developers' own site. The marketing point on iPaper is it eliminates the need for readers to have other readers on their machine, such as the Adobe Acrobat Reader and the Microsoft Office Readers.

Here's an example of embedding iPaper in the site:
TCP/IP

An Analysis of Scribd


There are a number of things that impressed me about the product.

  • It's free to use. I don't profit from my blog or my web site, and all of the costs for my web servers are out-of-pocket. Therefore, finding ways to control my costs is important to me. I can register to use the site for free, and I can host my writings for free.

  • I have more space on my web servers. Because my documents are being hosted on a third party site, I can utilize the space on my web servers for other things, such as a download site for my applications.

  • My documents reach a larger audience. Before using Scribd, I wasn't getting many hits from my documents. They were only being read if someone accessed it through my blog or if someone stumbled upon it from a Google search. Since publishing my documents one week ago, my readership rate doubled, and it's still growing.

  • If you are looking to make additional money with your documents, you can use their "Ads for PDF" program that will embed ads in your documents, and you can also earn ad revenue from your site if you embed iPaper documents on your site. Visit their site for more details.



DMCA: Digital Millenium Copyright Act - full explanation


There are some things that need to be addressed, though.

  • Like YouTube, Scribd has experienced some legal problems with their user base violating the DMCA (ex: users uploading PDF versions of copyrighted textbooks). However, Scribd has taken measures to remove content that violates copyrights, such as introducting copyright filters.

  • It appears that the iPaper control doesn't play nicely with some of the documents that are uploaded. For example, I noticed that some of the documents had unreadable characters that rendered through iPaper, but if I downloaded the document to my local machine as the document's native format (ex: PDF), the document renders fine on my local machine using the document's native format reader (ex: Adobe Acrobat).



Here is some additional information about Scribd

  • I haven't tried this myself (which is why I categorized this as an "unknown"), but I have read reports from various users that Scribd's iPaper doesn't work well on mobile devices such as the iPhone. If you have a chance to test this on a mobile device, please let me know.

  • If you are going to use Scribd as a hosting solution for documents that you've written, make sure you have a backup strategy in place. For example, I have my documents on local media (my personal machine and flash drives) as well as Scribd.

  • It's not a true document sharing tool by definition because you can't edit the content of your documents on the server once they are published. As a workaround, you can work on the document on your local machine and upload the latest changes to Scribd without losing your original statistics. While some authors critiqued this, I didn't really think it was a downside because I view Scribd as a content hosting server (like YouTube) rather than a document sharing tool (like SharePoint).



Why I Started Using Scribd


The main reason why I started using Scribd was cost. I wanted to make more room on my web servers without having to pay for more disk space, and Scribd was a tool that I can use to host documents that I've written at the lowest possible cost. Another reason was a way to build my career portfolio. Based on what I've seen in my web access statistics, my documents on Linux that I've written were reaching a healthy audience, but my other documents weren't getting as many hits. I wanted to be able to reach a larger audience, and Scribd was a tool that helped me do so.


Like Scribd, YouTube was intended for use as a site where people can publish their videos. Agents and producers search through YouTube to find new talent for free, and television networks use YouTube to publish their content rather than using their own web servers.

The intended use for MySpace was to provide a social network for musicians. MySpace has become a social network tool for users from all walks of life, including celebrities. MySpace is also been used by professional models as a way to publish their portfolio. Agents, producers and magazine editors (such as Playboy) search through MySpace to find new talent for free.


The Future of Scribd


I think that the site is going to be the next best thing because others found and will continue to find other uses for the site (ex: YouTube and MySpace). For example, the current economy is causing businesses to rethink how to spend their dollars. To help save money, recruiters are using Scribd to search for resumes for free, rather than pay fees to the mainstream job boards. I can also see publishers beginning to use Scribd to publish e-books for their company rather than publish the e-books on their own web servers.

Additional Sources:
The Killimanjaro Corporation v. Scribd.com et al. Retrieved 08 November 2008.
Wikipedia. Scribd. Retrieved 08 November 2008.
Gilbertson, Scott. iPaper: a Simple Way to View and Share Documents on the Web. WebMonkey. 20 February 2008. Retrieved 08 November 2008.

Thursday, November 6, 2008

Two years on, Raketu is getting better and better



Over two years ago, Raketu was released to the general public. I wrote a review of the product when it was initially released, which you can find here.


SIP - Session Initiation Protocol. This is the signalling protocol often used in VoIP networks.

For a more technical explanation:


There has been many changes made since I wrote that review:

  • They have IPTV featuring international programming

  • They improved their podcast support

  • Raketu RakOut works on Mac and Linux

  • They dramatically improved their user interface

  • They created two new services: RakOut WebPhone (allows user to make computer-to-phone calls from a web browser) and RakIn/RakSIP. RakIn/RakSIP is probably one of the biggest improvements to the product, since this capability allows Raketu users with a SIP device to connect to the Raketu service and receive telephone calls.

  • Raketu recently launched VideoCalling service, which allows users to conduct PC-to-PC phone calls (voice and/or video).



The most important development in this product, in my opinion, is the RakIn/RakSIP. In relation to VoIP, one of the selling points of Raketu was it had some of the lowest calling rates in the market today. However, since Raketu didn't support incoming calls, they couldn't really compete with some of the other VoIP providers (ex: Skype, Vonage, MagicJack). Now that they support incoming calls, they easily become a true competitor in the VoIP market.


SO/HO - Small Office Home Office


Although Raketu's target audience is the home user, it can also be used as a viable option for a SO/HO business. For example: a computer consulting business with about 2-3 employees may have clients outside the state, or even around the world. While there may be a need to travel to a client's site, it can get very costly. The RakOut WebPhone can be used for video conferencing between the client and the business, provided that both the client and the business have video cameras on their PCs. For the one-time cost of SIP-compatible phones and the monthly cost of high-speed Internet service, the RakIn/RakSIP service can be used in lieu of regular phone service. The monthly costs could be less expensive than standard phone service. If the business gets a SIP-compatible mobile phone (iPhone supports SIP clients like Raketu), the business can integrate their mobile services with Raketu, which could eliminate the cost of additional SIP-compatible phones for the static location.

I am quite pleased with the improvements that Raketu has implemented in their product. I am also impressed with their customer service. This company really listens to their customers and takes their suggestions into consideration in their product development. Raketu is a viable alternative to standard land-line phone service.

Monday, November 3, 2008

Choosing the Right School - the 2008 Edition


Digg!

Before continuing with this article, please read the following two posts that I've made in the past regarding this subject:
Choosing the Right School
Choosing the Right School - Revisited

There is a reason why I'm revisiting this subject. Right now, we are in shaky economic times, and many people are looking to school for training in a career that can (at least) get them a job and pay the bills. One of the trends that I'm seeing right now is students who are just choosing a certain major because they believe that it will get them a job that will allow them to support their family. A number of these students are choosing Information Technology majors. Many of these students don't really care for the field of study, nor is it something that they really want to do for the rest of their lives. They're choosing this field because they believe that it's the field that can get them a job that will pay them a living wage.

I'm about to post an opinion that will probably be controversial - those students are wasting their time and money.

Let me explain.

I do understand that the market is tight, and many people are losing their jobs. Many people are also underemployed (either working a part-time job as the primary employment or they are working a low paying job like a discount department store or a fast food restaurant because they can't find a job in their field that pays a living wage).

I do support their decision to go to school to better their career. However, if the only reason that someone chooses an Information Technology major is to better their career, then I don't support their decision, and here's why:

  • School is a major investment in time and money. Depending on the school, a two-year degree costs between $8,000 - $40,000. That's a lot of money to spend on something that doesn't appeal to you, especially during these lean times. If you are getting federal loans for your education, you still have to pay them back regardless of whether you liked your educational experience or not.

  • Part of success in school is choosing a field that interests you. I'm going to use myself as an example. I like to read historical biographies, but analyzing fictional literature bores the Hades out of me. I really don't give a whoo-ha about the symbolism that the author of the story is using and the messages that s/he's conveying in the story. Since I think that analyzing literature is boring, I never really put in the effort in those classes; I only did enough work that would get me a B-. Now, imagine if I decided to go back to school and study literature because it's a field that could get me a job. It would pain me to go to class. In fact, I'd probably go enough times and do enough work to get a passing grade. The problem is, in leaner economic times, the job market is much more competitive. My lower QPA/GPA will hold me back from interships that will get me the experience that employers want. Just say I'm lucky enough to find a job in the field. I wouldn't be happy at that job because it's not what I want to do.
    Now let's go back to the student - if it's a field that s/he's remotely interested in, then that's good. As s/he takes classes, s/he may grow to like the field more. However, if it's a field that doesn't interest him/her, the chance of the student dropping out is high, and if the student stays the course, the chance of the student doing well academically is low.

  • Another part of success in school is choosing a field in which you can excel. I will use myself as an example again. Maths and sciences were my forte. Fine art is not. I always say that I'm lucky that I can draw a straight line. If I decide to go back to school for multimedia, which requires a number of art classes, I wouldn't do very well because I don't have the artistic talent that many others have. Instructors will give me low grades for my work. If the instructor just passes me along, I won't have a good chance at finding a job because there are numerous people out there that are more talented than I am. Let's get back to the student - if the person doesn't have the talent for that field, it's not for that person. If the person is not very good at mathematics, then computer programming is not for them.



So what is a person to do? Again, school is a major investment in time and money. While going back to school is a good thing for your career, don't let "getting a better job" be your only reason to go back to school.

Sunday, November 2, 2008

A Historical Election Day in the US (2008)


Digg!

Regardless of who wins the election, history is about to be made in the United States. We are either going to be getting our first man of color as President, or we are going to get our first female Vice-President (and our eldest elected President should that party win).


About two years ago, Professor Ed Felton from Princeton University and 2 graduate students found ways to hack the Diebold voting machines.

Election day in the United States is interesting for technology since USA has been using paperless voting machines for about 3 years now. Again, the focus of discussion on many radio and television news programs is the "hackability" the voting machines.

If you're interested in how the hack works, here is a video demonstrating the hacking:



For a little humor about hacking the voting machines, here's a funny satire video post on hacking voting machines.


I've written about this topic on the blog during the 2006 election, and the things that I've discussed then seem to be relevant today.

Saturday, November 1, 2008

C# Tutorial - Combine Multiple Word Documents into One Word Document


Digg!


Click the link to download the source code for this post

Licensing and Warranty

You may use the code as you wish - it may be used in commercial or other applications, and it may be redistributed and modified. The code is provided "as-is". No claim of suitability, guarantee, or any warranty whatsoever is provided. By downloading the code, you agree to defend, indemnify, and hold harmless the Author and the Publisher from and against any claims, suits, losses, damages, liabilities, costs, and expenses (including reasonable legal or attorneys' fees) resulting from or relating to any use of the code by you.




One of the tasks that I have to do at work is combine a few Word documents into one Word document, convert it to a PDF, and publish the PDF on the web. I really didn't like to manually combine the documents, so I wrote a quick program that allows me to combine the documents into one document.

Overview


The command-line program uses the Microsoft.Office.Core library to reference Microsoft Word.

In a nutshell, the program does the following:

  • It gets the values that the person entered at the command line

  • It opens a new Microsoft Word file

  • It loops through the paramters, opens each file, and appends the file to the new Microsoft Word file

  • It saves the new file



Highlights


Using an "alias" in the using statement
A quick trick that you can do when referencing a library is assigning a quick "alias". You can then reference the alias throughout your program. Here is an example of how to use an alias in the using statement, and here is an example of referencing the alias:

using WORD = Microsoft.Office.Interop.Word;
:
object sectionBreak = WORD.WdBreakType.wdSectionBreakNextPage;


Capturing the Files to Combine
In order to find out which files to combine, we need to start from position 2 in the array to find out which files we need to combine. What I did in the code is starting from position 2 in the parameters, I build a new array (line 22 in the source). Here is the code snippet:

String[] parms = new String[args.Length - 2]; // subtract 2 - the parm starts @ pos 2, not pos 0
for (int x = 0; x < parms.Length; x++)
{
 parms[x] = args[x + 2];
}


Setting Up the Word Document
Below is the code snippet (line 29 in the source):

// Set up the word object
object template = @"Normal.dot";
String fullName = destDir + "\\" + destFile;
//object fname = @"F:\temp\new_file.doc";
object fname = fullName;
object missing = System.Type.Missing;
//object pageBreak = WORD.WdBreakType.wdPageBreak;
object sectionBreak = WORD.WdBreakType.wdSectionBreakNextPage;

// Create Word application
WORD._Application app = new WORD.Application();

In the first 5 lines, I am setting up variables for the following:

  • The Word template to use

  • The destination (new) file. Note that I have used double backslashes, because the backslash is an escape sequence character in C#. If I used one backslash, I would get a run-time error.

  • A reference to the type of section break in Word. Note that if you want a page break instead of a section break, make a reference to the page break instead.


The final code line creates an instance of the actual Word application.

The Process of Appending the Document
The code to append the documents into one document starts from line 40 in the source. Below is the code snippet:

try
{
  // Create new file
  WORD._Document doc = app.Documents.Add(ref template, ref missing, ref missing, ref missing);

  WORD.Selection selection = app.Selection;

  // Write text
  //selection.TypeText("Write something...");
  //selection.TypeParagraph();

  // New page
  //selection.InsertBreak(ref pageBreak);

  // Insert file
  String insertFile = "";
  for (int y = 0; y < parms.Length; y++)
  {
    insertFile = destDir + "\\" + parms[y];
    selection.InsertFile(insertFile, ref missing, ref missing, ref missing, ref missing);
    //selection.InsertBreak(ref pageBreak);
    selection.InsertBreak(ref sectionBreak);
  }

  // SaveAs
  doc.SaveAs(ref fname, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
}
finally
{
  // Close Word application
  app.Quit(ref missing, ref missing, ref missing);
}


Let me explain various code blocks:

  // Create new file
  WORD._Document doc = app.Documents.Add(ref template, ref missing, ref missing, ref missing);

  WORD.Selection selection = app.Selection;

This code block creates a new document and sets up the cursor.


    insertFile = destDir + "\\" + parms[y];
    selection.InsertFile(insertFile, ref missing, ref missing, ref missing, ref missing);
    //selection.InsertBreak(ref pageBreak);
    selection.InsertBreak(ref sectionBreak);

This code inserts the contents of the file in our new document. Then, it inserts a section break. Again, if you want to enter a page break instead of a section break, you will need to reference the page break instead of the section break. Also note that you don't have to insert any breaks if you don't want to.


  doc.SaveAs(ref fname, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);

This line saves the new document.

This code has a boat load of possibilities. For example, if your final application is required to write text to a new Word document, this code will work. Note that you'll have to comment out the logic that reads the contents of the other Word files, and you'll have to uncomment and modify the logic that writes text (line 47 in the source)

// Write text
//selection.TypeText("Write something...");
//selection.TypeParagraph();



If you have any questions, please post a comment or just ask. :)


Quick Note About the Program: If you are using spaces in the names (ex: C:\documents and settings), you must surround the values with double quotes (ex: "C:\documents and settings") because the C# command prompt treats each space-delimited value as a parameter.