Wednesday, August 6, 2008

C# programming overview

Overview of C# 3.0

The main goal of C# 3.0 is to simplify working with data and make it possible to access relational data sources (database) in much simpler ways. In C# 3.0, this is implemented in an extensible way, not by simply adding several special-purpose constructs. Thanks to the new language constructs, it is possible to write statements like the following:

var query = from c in db.Customers                where City == "London"               orderby c.ContactName;               select new { CustomerID, ContactName };

This statement looks like an SQL query. This is achieved thanks to query operators (FROMWHERESELECTORDERBY and some others) that were added to the language. These operators are syntactic sugar that simplify writing of queries, but are mapped to underlying functions that perform projection, filtering or sorting. These functions are called SelectWhereOrderBy. For example, to perform filtering, the Where function needs to take another function as a parameter. Passing functions as a parameter to other functions is possible using new a language feature called lambda expressions. This is similar to the lambda functions known from many functional languages. You can also see that the query returns only CustomerID and ContactName from the more complex Customer structure. It is not required to explicitly declare a new class with only these two members because C# 3.0 allows developers to use anonymous types. It is also not required to declare the type of query variable because type inference automatically deduces the type when the var keyword is used.

Cω and integration of data access

The original idea of integrating data access into the general purpose programming language first appeared in the Cω research project at Microsoft Research. The data access possibilities integrated in Cω include working with databases and structured XML data. The LINQ project is mostly based on Cω; however, there are some differences. The features that can be found in both C# 3.0 and Cω include anonymous types (these are not limited to local scope in Cω), local type inference and query operators. One concept that wasn't available in Cω is extensibility through expression trees. In Cω, you couldn't write your own implementation of data source that would execute queries over anything other than in-memory data. The following demonstration shows how working with databases in Cω looks; it is very similar to the previous example written in C# 3.0:

query = select CustomerID, ContactName            from db.Customers            where City == "London"           order by ContactName;

The Cω project will be mentioned later in other sections because some of the features that are available in C# and were originally implemented in Cω are more powerful in Cω. It is therefore interesting to see this generalization.

C# programming

Introduction

The C# 3.0 currently available in preliminary version is part of the LINQ project [1]. The aim of this project is to integrate better support for working data into mainstream general-purpose programming languages developed at Microsoft. It particularly targets the .NET platform, i.e. C# and VB.NET. Most of the ideas that are implemented in C# 3.0 are already available in mostly research and experimental languages that were previously developed at Microsoft Research. Among the most interesting and influential of these languages developed are Cω [2] and F# [3].

Contribution of F#

F# is a language based on ML, which is an impure functional language. In fact, it is based on a language called OCaml that adds several features to the standard ML. Functional languages are very different from imperative languages, with most of the widely used languages like C++, Java, and C# being imperative. The biggest contribution of F# is that it shows how functional languages can be compiled for the .NET Runtime (CLR) because the .NET CLR was initially designed for executing code written in imperative languages. Another aim of F# is the interoperability with other languages targeting the .NET platform. Part of the F# related research is also the ILX [6] project that shows how the .NET runtime could be extended to provide better support for functional languages, like first-class functions.

Functional programming, in general, was a big inspiration for some of the C# 3.0 features. The F# research language already showed how these features could be implemented for the .NET platform. C# 3.0 includes constructs that were inspired by:

  • Type inference: ability to deduce the type of expression
  • Tuples data types: types that represent a pair of values
  • First class functions: ability to take a function as a parameter and return it as a result
  • Lazy evaluation: ability to evaluate expressions only when it is needed later
  • Meta-programming: ability to manipulate with program source code

Most of these features that were added to C# 3.0 are very limited when compared with their implementation in F# and other functional languages. However, it is very interesting to see how functional concepts are becoming more and more important and can benefit the non-functional languages.

Contribution of Cω

Cω is a language based on C# and extends it in two important areas. The first area is better support for working with structured data (XML) and relational data (databases). The language extends the type system of C# to include support for several data types that are common in relational and structured data. It also provides querying capabilities for working with these data structures. The second area is support for concurrency constructs as a part of the language. In most of the widely used programming languages, support for concurrency is provided as a class library. By including these constructs in language, the program becomes more readable -- i.e. the intentions of the programmer can be expressed better -- and more work can be done automatically by the compiler.

C# 3.0 and LINQ project in general are inspired by the first area of extensions in Cω. The syntax extensions in C# 3.0 are very similar to the concepts developed in Cω. The biggest difference -- aside from the fact that Cω is an experimental language -- is that C# 3.0 provides better extensibility. This allows developers to provide a mechanism for working with different data sources. This extensibility is provided as a language feature and not as a compiler feature, as is the case with Cω. On the other hand, some extensions in Cω were simplified in C# 3.0. Anonymous types will be mentioned later, by way of example. So, where appropriate I will include examples where something possible in Cω can't be done in C# 3.0.

Java programmers

Java Programmers

Introducing the Single Java Object

No, this isn't a dating guide for Java developers! A fundamental pattern in software design is the singleton, an object which cannot be created (instantiated) more than once. In this article, you'll be introduced to the notion of a design pattern, and see how the singleton can be employed in your applications.
[SEPTEMBER 12, 2001]

The Carnival is Over.... Farewell to JavaOne 2001

We wrap up the JavaOne 2001 conference, and select some of the shows highlights. Also, for developers that missed the chance to attend the conference, there's some good news - you can access the conference contents online through Sun's new Java Learning Center.
[JULY 14, 2001]

"Are you Ready for WAP & WML?"

Learn about the Wireless Application Protocol, and how to make your sites accessible to wireless appliances like WAP-enabled cell phones. [AUGUST 12, 2000]

Exciting News from JavaOne

This year's JavaOne 2000 conference (June 6-9) was a blast! There were plenty of exciting announcements for developers, ranging from new Java platforms to demonstrations of real-time Java. David Reilly has all the news and gossip, and reports on the success of the conference. [JUL 1, 2000]

Getting Jini with it

No this ain't Will Smith getting 'jiggy' with it. Get 'Jini' with it, and learn about an exciting networking and distributed systems technology for hardware and software services. Think of Jini as networked plug'n'play, and you'll see but a fraction of the vision behind this new technology. Jini is the future of networking! [APR 1, 2000]

A bit about garbage collection

In an excerpt from Thinking in Java, Bruce Eckel talks about automatic garbage collection, a cool feature that de-allocates unused memory space, freeing it up for other purposes. [FEB 1, 2000]

Comparing C++ and Java

In an excerpt from Thinking in Java, Bruce Eckel lists the important differences between C++ and Java that developers should be aware of. If you're trying to get up to speed with Java, and come from a C++ background, this list will be invaluable. [JAN 1, 2000]

Yet another fractal generator

Fractal images are visually impressive patterns produced by a mathematical formula. Qian Xie shows readers how to construct fractal images using either applet or an application, which includes sample code. [DEC 1, 1999]

"Sitting for the Sun Java Certification Exams"

Despite what you may have heard, achieving Java certification isn't an impossible lofty goal. With a little experience, and a little study, almost any developer can become a Sun Certified Java Programmer. [OCT 12, 1999]

"Object Persistence Made Easy"

Object persistence is the ability to save the state of an object, and to later restore it. Java supports object persistence through serialization. Object serialization allows you to save the entire contents of objects, with only a few lines of code! No more writing file structures or length save/restore functions. [SEP 6, 1999]

"Java coming to a TV near you!"

Imagine interactive Java applications running on your television set, controlling its operation and streaming audio and video content. Imagine playing interactive games, or buying products simply from the comfort of your couch. It probably sounds like science-fiction, but the Java TV API promises to make it a reality. [JUN 24, 1999]

"Handling network timeouts in Java"

Slow connections, traffic build ups, or power interruptions can cause network connections to stall or even die. Few programmers take the time to detect and handle network timeouts, but avoiding the problem can cause client applications to freeze, and for threads in servers to block indefinitely. There are, however, easy ways to handle network timeouts. In this article, you'll learn two techniques for solving problem of timeouts in networking applications. [MAY 25, 1999]

"Top Ten Errors Java Programmers Make" - How to spot them, how to fix them.

An informative article, teaching better Java programming techniques. Not only does it teach how to find errors, but also how to fix and prevent them. [APR 30, 1999]

Getting started with JDBC

Would you like to learn database programming in Java? This article will get you started, and provides a JDBC database application which can communicate with an Access database. [DEC 1, 1998]

Java RMI & CORBA - a comparison of competing technologies

With the introduction of CORBA support to Java, developers face the question - "Should I use CORBA, or should I use RMI?".   This article gives an evaluation of these two technologies, and presents a summary of their pros and cons. [NOV 25, 1998]

Introduction to RMI

Remote Method Invocation (RMI) allows you to call functions of remote objects, and to create distributed services. This article shows you how to create such services, and gives an example of an RMI client and server. [OCT 31, 1998]

Java and CORBA - a smooth blend

Common Object Request Broker Architecture (CORBA) allows developers to create distributed systems that are capable of invoking object methods remotely. Java IDL introduces support for CORBA, as part of Java 1.2.  Learn more about this exciting new technology, and how to write your own CORBA services. [OCT 29, 1998]

"Decompilers - friend or foe?"

Decompilers can examine compiled Java classes, and analyze them to produce readable source code. Imagine if your product, or your applet, was being decompiled and analyzed by other developers - looking for security holes, or taking proprietary techniques and algorithms from your product to use in their own. Now with updated information on methods of protection, and stronger decompilers. [OCT 2, 1998]

"JavaBeans - a new component architecture"

Offers an introduction to JavaBeans, from a non-technical prospective. This article compares JavaBeans with a related component technology, ActiveX. [OCT 24, 1997]

Java best for games

Java Gaming :
The Best of Java Games

Java Gaming highlights some of the great applet games out there written in Java. Sure, you won't see Quake on the web, but the games that are out there will astound and amaze you. Each month, we'll take a look at a sample of the great games out there.

Previous columns

  • Race3D, real 3D driving with sound effects

  • Mr Platfoot, addictive gameplay with a flying shooting puppy

  • RollerBoy 2, choice of hero or heroine, and an addictive scroller

Java info and tips

Java Beginners

"Java Beginners" is a new series of articles aimed at people learning the basics of Java. These articles aim to teach important Java concepts, but at a gentler pace.

1. Is Java driving you loopy?

Loops and iteration can be tricky to master for beginners. In our no-nonsense guide, we take the complexity out of looping, so you won't go poco loco. [MAY 1, 2000]

2. Why is my applet gray? or
What causes applets to fail?

Everyone's seen it before - the ugly gray box of Java (UGBoJ). In this article you'll learn why they occur, and how to avoid them, with some simple to follow directions. [FEB 1, 2000]

3. Using MediaTracker to help load images

Images can cause a lot of problems for applets. They are often slow to load, and can cause animated applets to behave badly when images are only partially loaded. Learn how to use the MediaTracker class to help load images. [NOV 2, 1999]

4. Unraveling threads

Learn the basics of multi-threaded programming, with an easy-to-understand introduction to the topic. Includes an example of a multi-threaded applet, which displays a text-scrolling animation.
[JAN 5, 1999]

MS Access: How can I

How I Can Get How Many Days In A Month...?


Question

I want to know how many days in a month ...?  For example:
    
    February 1998 have 29 days
    February 1999 have 28 days

Are there function to get this information in access 97..?

Answer


Here is the most (?) effective solution:

Public Function GetMonthDays(ByVal vdat As Date) As Integer   GetMonthDays = Day(DateSerial(Year(vdat), Month(vdat) + 1, 0)) End Function

MS Word: Tips most useful

Absolutely Getting Rid of Formatting Want to get rid of every shred of formatting in a chunk of text? The tools are right on your system, and this tip explains how to quickly strip the formatting you no longer want. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Adding Fonts To the Context Menu Context menus appear when you right-click on different items in Word. These menus can be edited to add items, such as common fonts you routinely use. You can then apply a font to selected text by right-clicking and using your newly modified Context menu. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Adjusting the Distance between Borders and Text Word can place a border around your paragraphs easily. After doing so, you may decide the border needs to be farther from the text. Here is how to do that easily. Microsoft Word versions: 6 | 95

Applying Formatting in Lists How to change the font characteristics in lists without changing the text characteristics. Microsoft Word versions: 97 | 2000 | 2002 | 2003

AutoFormatting a Document Using the automatic formatting capabilities of Word. Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

Automatic Blank Pages at the End of a Section If you want to have a blank page at the end of a document section, you can insert one manually or you can use the technique described in this tip. The technique makes the added pages dynamic and easy to use. Microsoft Word versions: 97 | 2000| 2002 | 2003 | 2007

Automatically Formatting Text within Quotes If you want to do formatting changes to quoted text within a document, figuring out exactly how to do it can be challenging. This tip discusses a couple of ideas you can use. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Basing Headers and Footers on the Previous Section Word treats the headers and footers in a document independently, based on the section in which they appear. This means that the headers and footers in one section can be different from those in the previous section—or you can instruct Word to continue the headers and footers from the previous section. This tip examines some of the interactions that these settings can cause within a document. Microsoft Word versions: 97 | 2000 |2002 | 2003

Breaking Lines in E-mail If you are creating an e-mail in Word, or are creating text that you will paste into an e-mail document, you may want to limit the length of each line of that text. This is easy to manually do in short messages, but much more difficult and time consuming in longer messages. The handy macro in this tip can do the tedious work for you, rendering a plain text message with each line no longer than a specific length. Microsoft Word versions: 97 | 2000 | 2002| 2003 | 2007

Changing AutoFormatting Rules Adjusting how Word does automatic formatting. Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

Changing Sections A section is an organizational unit within a document that enables you to change different page-level formats in the same document. Sections are very helpful for some formatting needs, but you may not get the anticipated results when you choose to delete sections you no longer need. This tip explains why. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Changing Text Orientation Word allows you to change the orientation of text contained within certain objects, such as AutoShapes, text boxes, and table cells. Changing the orientation is easier enough, but how you do so depends on the version of Word you are using. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Changing the Default Font in Word 2000 and Later Versions An easy way to set the default font in Word's versions 2000 and later. Microsoft Word versions: 2000 | 2002 | 2003

Changing the Height of a Font Word allows you to independently adjust the horizontal width of your fonts, but not the height. There is one way around this shortcoming, as described in this tip. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Columns within Text Boxes Text boxes are a common design element for some documents. If you want a text box to contain multiple columns, you are out of luck—Word doesn’t allow columns in text boxes. This tip describes how you can work around this limitation and get the design to appear just as you want it. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Consistent Formatting Between Word Versions How to troubleshoot formatting issues caused by upgrading to a newer version of Word. Microsoft Word versions: 97 | 2000 | 2002 | 2003| 2007

Consistent Spacing Do you need to check your document to make sure that each sentence has one and only one trailing space? This tip presents a macro that will make short work of getting rid of any extraneous spaces after sentences. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Consistent Spacing in WordBasic Want to make sure you have the same number of spaces at the end of every sentence? This WordBasic macro will help you be consistent. Microsoft Word versions: 6 | 95

Converting List Types There are two types of common lists you can create in Word: bulleted lists and numbered lists. You can switch between the type types by using the techniques described in this tip. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Copying Formats Want to copy a format from one place to another without taking your hands off the keyboard? It’s easy to do if you apply the shortcut keys in this tip. Microsoft Word versions: 97 |2000 | 2002 | 2003 | 2007

Creating a Numbered List Numbered lists provide a 1-2-3 way of organizing your document. You can create numbered lists very easily using the techniques in this tip. Microsoft Word versions: 97 |2000 | 2002 | 2003 | 2007

Creating See-through Text Boxes Want clear areas of your text boxes to be transparent? Here's how to do it. Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

Deleting Borders Borders around a paragraph can be a nice touch, but you may want to remove those borders at some time. You can do so quite easily by following the information in this tip. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Detailed Measurements The ruler, a helpful tool for viewing positioning information, can be even more useful with this tip. Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

Different Layouts for Footnotes If you want to have footnotes appear in a different number of columns than what your text appears in, you may be out of luck. Word won’t support this type of formatting, unfortunately. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Double Indenting Indenting a paragraph is easy in Word. In fact, the program provides shortcut keys that make it a snap. Indenting from both the left and right margins is not as easy, but you can make it easy by using the techniques described in this tip. Microsoft Word versions: 97 | 2000 |2002 | 2003 | 2007

Drop Shadows for Tables When adding borders and shading to a document’s elements, Word allows you to quickly add drop shadows to paragraphs, text boxes, and other objects. What you cannot easily do is to add a drop-shadow to a table. This tip explains different ways you can still achieve the desired results. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Eliminating "Before Spacing" at the Top of a Page One of the formatting attributes that can be specified for a paragraph is to leave space before the paragraph when flowing the text in a document. This is great for setting the paragraph (perhaps a heading) off from surrounding text, but you may not want this “space before” to appear if the paragraph is at the top of a page. This tip explains the formatting ins and outs and how you can control where Word places paragraphs formatted in this way. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Embedding TrueType Fonts How to include fonts with your document. Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

Embedding TrueType Fonts by Default TrueType fonts can be embedded in a Word document so that it can be properly viewed on systems that don’t have the font installed. If you embed fonts often, you may want a way to do so by default, without the necessity of explicitly going through the proper steps for each document. This tip explores ways you can accomplish this desire. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Embedding TrueType Fonts in E-mails Composed in Word When you use Word as your e-mail editor, it allows you to format the text of your e-mail messages using tools you are familiar with. Not all features relative to a document—such as embedding fonts—are available in the e-mail messages created with Word. This tip presents a way you can workaround this limitation. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Engraving Text Defining what Engrave Text is and how to use it in your Word document. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Ensuring Consistent Lines on Each Page Need to have a specific number of lines on each page in your documents? What if those documents are subdocuments to a master document? This tip explains the ways that you can get the exact number of lines you need. Microsoft Word versions: 97| 2000 | 2002 | 2003 | 2007

Extra Shaded Lines If you insert a page break at the beginning of a paragraph, and the paragraph in which you insert the break is shaded, you could end up with some shading left at the bottom of the preceding page. This tip explains why and how you can avoid such a formatting faux pas. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Fixing Mismatched Bullets and Numbers A tip for using Show/Hide to locate mismatched features in Bullets and Numbering. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Font Substitution Problems If you exchange documents with other people you may run into problems related to font substitution. This occurs when Word, unable to find a required font, substitutes a different font, thereby altering the display and printout of the document. Different ways to approach this problem are covered in this tip. Microsoft Word versions: 97 | 2000 | 2002 |2003

Format E-mail using AutoFormat in Older Versions of Word How to format e-mail (or Web pages) that you paste into a Word document so that they wrap like normal text. Microsoft Word versions: 6 | 95

Format Painter Shortcut The Format Painter is a great help when it comes to applying consistent formatting in a document. If you memorize two easy-to-use shortcuts, you can gain even more advantages by using the keyboard instead of the Format Painter itself. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Formatted Merging When you use the mail-merge capabilities of Word, the information merged takes on the formatting of your source document, not your data source. If you want to apply different formatting to some of the information you merge, you’ll need to use the technique illustrated in this tip. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Formatting All Headings At Once If you need to apply a common formatting change to all the headings in your document, a quick way to do it is to use the Outline view of Word. This tip presents a simple technique that can save you loads of time. Microsoft Word versions: 97 | 2000 | 2002 |2003 | 2007

Formatting Differences between Word Versions Create a document in one version of Word on one machine and then open that document in a different version of Word on a different machine and you may be surprised at the results. There can be lots of things that affect how the same document is rendered, displayed, and printed on each system. This tip discusses some of the things you can do to minimize the differences between systems. Microsoft Word versions: 97 | 2000 |2002 | 2003

Formatting E-mail using AutoFormat If you copy the text of an e-mail message to a Word document, you may notice that the formatting of the text leaves a lot to be desired. If you are faced with formatting text that originated in an e-mail, you’ll appreciate the information presented in this tip. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Formatting Fractions Need to have a great looking fraction in a document? It’s relatively easy to do if you apply the formatting techniques discussed in this tip. Microsoft Word versions: 97 | 2000| 2002 | 2003 | 2007

Formatting Shortcut Key Behavior Changes in Word 2000 Ways in which the formatting shortcut keys changed in Word 2000. Microsoft Word versions: 6 | 95 | 97 | 2000

Highlighting Information Using Shading Paragraph shading is a quick, easy way to highlight information in a document. Using the Borders and Shading dialog box, you can apply all sorts of shading to your text. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Hyperlink Formatting Word, as you type, normally formats hyperlinks automatically. If you don’t like the way that hyperlinks look in a particular document, you can make a simple change to the style used for hyperlinks and the change will be made throughout your document. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Inserting Signature Lines How to create signature lines in a Word document. Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

Keeping Paragraphs on the Same Page The tool to keep your paragraphs formatted to stay on the same page. Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

Letters and Numbers in Page Numbers How to combine letters and numbers in your page numbering Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

Margin Notes in Word Some types of documents rely upon margin notes to the left or right of your main text. Getting these to appear in Word can be tricky, as there is no built-in function that creates them. This tip discusses one approach you can use, which involves tables. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Mixing Column Formats On a Page Want to switch the number of columns used for your text, in the middle of a page? You can do this very easily by following the steps in this tip. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Precise Ruler Adjustments When adjusting the position of things on the ruler (like tab stops), you can use the Alt key to get very precise in your adjustments. Just hold down the key as you drag items with the mouse, and you can immediately see what is happening. Microsoft Word versions: 97| 2000 | 2002 | 2003 | 2007

Problems Using Words as Bullets If you know the secret, you can use actual words as “bullets” in a bulleted list. The built-in bulleted lists in Word aren’t the way to achieve what you want to do, and this tip explains why. It also provides a macro that you can use to apply the formatting you want to the list. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Protecting Headers and Footers If you don’t want the information in a header of footer to be changed by users of your document, there are a couple of things you can try. This tip discusses one approach, using the protection features of Word itself. Microsoft Word versions: 97 | 2000 | 2002| 2003 | 2007

Quickly Adjusting Paragraph Spacing Word allows you to easily adjust the amount of white space before and after a paragraph. Rather than continually displaying the Paragraph dialog box, you may want to use the macros in this tip to make short work of adding the desired space. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Quickly Changing Font Sizes A quick little shortcut can help you easily step through different font sizes for whatever text you’ve selected. Word provides a shortcut for increasing font sizes and another for decreasing font sizes. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Quickly Displaying Formatting Specs Word maintains detailed formatting information about every shred of text in a document. This tip explains how you can see those details so you can understand the formatting just as Word understands it. Microsoft Word versions: 97 | 2000 | 2002| 2003

Quickly Formatting Multiple Documents What is the best way to apply consistent formatting across a range of documents? Templates, of course, are very helpful in this regard. There are other formatting considerations which are not controlled by templates, and this tip presents ways you can account for all the formatting you need to apply. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Read-Only Embedded Fonts How Word embeds fonts and how to work around some of the quirks involved in sharing Word documents. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Removing the Box from a Text Box Insert a text box, and it is automatically formatted to have a border around it. Getting rid of the border is easy, if you follow the steps in this tip. Microsoft Word versions: 97 | 2000 | 2002 | 2003

MS Word: Tips new documents

Creating a New Document in VBA You can create a brand new document within your VBA macro. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Creating Traditional Forms Are you using Word to create a traditional form; one that will be printed on paper and then filled in? This tip is full of advice on how you can make those forms look the best they can look. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Inserting an Em Dash Em dashes are often used in documents. Here's how to add one. Microsoft Word versions: 6 | 95 | 97 | 2000 | 2002 | 2003

MS Wors : Tips Tricks Answers

Applying Bullets from the Keyboard Most people use the toolbars or ribbon to apply bullets to paragraphs. If you want to apply them using the keyboard, then you can do so with a bit of preparation. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Applying Formatting in Lists How to change the font characteristics in lists without changing the text characteristics. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Applying Numbers from the Keyboard Creating a numbered list is often done by using tools on the toolbars or the ribbon. With a bit of preparation you can create numbered lists using keyboard shortcuts. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Automatic Question Numbering Sometimes an automatic number isn’t the only thing you need at the start of a paragraph. For instance, this tip explains three different methods of how you can put a standard underline space before the numbers in a numbered list. This can come in handy if you need to include the underlines as an “answer area” for each question. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Changing the Bullet Type When you apply bullet formatting to paragraphs, Word allows you to choose from a variety of different bullets. If you want, you can switch between those different bullet types, or you can define your own bullets. This tip shows you how. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Chapter Numbers in Indexes and TOAs Word allows you to define prefixes for page numbers. These are often used for chapter or section numbers in a large document. Getting these prefixes to appear in all the places you want them can, at times, be tricky. This tip provides a step-by-step way to make sure they are included. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Continuing Your Numbering If you have a couple of numbered lists separated by regular text paragraphs, you might want the secondary lists to be continuations of the first one. Setting this up is rather easy, depending on your version of Word. Microsoft Word versions: 97 | 2000 | 2002 |2003 | 2007

Creating a List You can format both numbered and bulleted lists very easily in Word. The tools available on the Formatting toolbar or on the Home tab of the ribbon make it a snap. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Creating a Numbered List Numbered lists provide a 1-2-3 way of organizing your document. You can create numbered lists very easily using the techniques in this tip. Microsoft Word versions: 97 |2000 | 2002 | 2003 | 2007

Ensuring Standardized Numbering Word’s built-in numbering capabilities are, in the words of many experts, not very “robust.” This means that your numbering can produce undesired results and even look entirely different on other people’s systems. This tip explains why this happens and provides some ideas of how you can address the problem. Microsoft Word versions: 97 | 2000 |2002 | 2003

Lining Up Numbered List Numbers Do you wan the numbers in your numbered lists to be aligned differently than they normally are? You can adjust the alignment by following the steps outlined in this tip. Microsoft Word versions: 97 | 2000 | 2002 | 2003 | 2007

Problems Using Words as Bullets If you know the secret, you can use actual words as “bullets” in a bulleted list. The built-in bulleted lists in Word aren’t the way to achieve what you want to do, and this tip explains why. It also provides a macro that you can use to apply the formatting you want to the list. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Removing a List If you have lists in your document, either bulleted or numbered, you may want to change them back to regular text at some point. This is easy to do, using the same tools you used to create the lists in the first place. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Reverse Numbered Lists Numbered lists are easy to generate in Word; it is part of the built-in formatting capabilities of the program. If you want reverse numbered lists (lists that count down toward 1), then you need to create your own lists that are a bit more tricky in nature. This tip explains how to get just what you want. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Stubborn Highlighting Sometimes formatting can appear to “stick” on bulleted or numbered lists, and getting rid of that stubborn formatting can be troublesome. Here’s how to make it go away and get things back to normal. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Understanding and Creating Lists There are two types of common lists you can use in a document: bulleted lists and numbered lists. This tip explains the differences between the two and shows how you can easily create them both. Microsoft Word versions: 97 | 2000 | 2002 | 2003

Powerpoint tips

Save Your Fonts with Your Presentation

If you're preparing a presentation that you plan to distribute to others, be sure that you check this option by clicking on the Tools button in the File/Save As dialog box.  This will work for most TrueType fonts on the Windows platform.

Saving Your Toolbar Configurations

If you like to customize your UI, move toolbars around, configure toolbars, etc, then you'll want to know that all this information is stored in c:\windows\application data\microsoft\powerpoint\ppt.pcb

By copying this file, you can move your customizations to other machines. 

Displaying Keyboard Shortcuts in Tool Tips

If you'd like to see the available keyboard shortcuts for menus, commands, and toolbar buttons, go to Tools/Customize, click on the Options tab, and click on "show shortcut keys in screen tips". 

Getting Rid of Short Menus

Forgetting user reaction to this feature when it was introduced in Word years ago, the Office team decided to try it again.  Unfortunately, it's still annoying.  To see all of your options when you click on menus, go to Tools/Customize, click on the Options tab, and uncheck "menus show recently used commands".

Preview Fonts in the Toolbar

If you'd like to see previews of the actual fonts in the font selection of the formatting toolbar, go to Tools/Customize, click on the Options tab, and click "List font names in their font", click Close.

Making Auto-Fit Text Stop Auto-Fitting

Turn this feature off by going to Tools/Options, click on the Edit tab, and uncheck "autofit text to text placeholder", click OK.

Getting Rid of Tri-Pane View

Unfortunately there is no way to permanently avoid this improvement, but you can quickly get rid of it by holding down the CTRL key when you click on the Slide View button.

Using Ctrl-Drag to Copy

You can quickly make a copy of any object by holding down the CTRL key while you drag on the object.  You will then "drag off" a new copy.

Making Slides Print Correctly

PowerPoint has certain defaults to determine how it prints each object on the page.  You can see over-ride these defaults.  Go to View/Black and White; this will show you a gray-scale preview of how your slide will print.  To change the print settings for any given object, right-click on it, then click "Black and White", and then choose the appropriate print option for that object.  Master objects can be selected by going to the Master page View.

Preview Slide Show Effects

While editing a presentation, hold down the CTRL key while clicking the slide show view button; this will open a tiny preview window showing that slide in slide show mode.

Setting the Default Text Style

 If you want to change the style of the text that appears when you type things that aren't the title or the slide body, do the following:
Make sure no objects are selected.
From the Format menu, select Font. Make all the changes that you want there, and click OK.
From that point on, new text will be created in that style.

To Set the formatting for the title or slide body objects, go to the Slide Master and format these objects on the master.

Using Different Backgrounds within one Presentation

 Users of PowerPoint 2000 and lower will only have two background designs automatically supplied with the Masters (counting both the Slide Master and the Title Master).  However, you can have any design you want on any slide. From the Format menu, select Background. Check the box that says "omit background items" and this will make the slide ignore the Slide Master's design. You are now free to add whatever design you want to this slide. If you want to do this to many slides at once, go to the Slide Sorter, select the slides, and then use the Format menu command. Remember though that if you choose to do something like put a photographic background on many of your slides instead of doing it once on the Master, that your file size may increase dramatically.

PowerPoint 2002 supports multiple background masters.

Using More than One Guide

 If you like using guides, but wish there were more, you can create additional Guides by simply holding down the CTRL key while dragging on an existing Guide. This will create a new guide. To get rid of guides, just drag them off the edge of the slide.

Using Guides to Measure

Make the Guides visible by using View/Guides.  Then, hold down the SHIFT key while you click-and-hold a guide; the tooltip for the guide will display 0:00.  As you move the guide, the distance the guide covers from the beginning of the drag will be displayed in the units of your ruler.  In this way you can measure distances between objects, place guides at specific places, etc.

Creating Pages with Slides and Descriptive Text

If you want to create printable pages that have notes or descriptive text associated with each slide, PowerPoint has a feature designed to do just this called Notes Pages, or Speaker's Notes (depending on which version you're using). To view the Notes page for any slide, go to the View menu and select Notes Pages. You will see an image of your slide there, and a placeholder for adding your script, notes, or any other text you wish. You can cut-and-paste text from Word here if you like. To print these pages, bring up the Print dialog, and at the bottom of the dialog where it says "Print What:", select Notes Pages. These pages were originally designed to be used as audience hand outs (with space for the audience to take notes) but were also used by many as speaker's notes: the text block would have the script of the presentation, to be used by the speaker, or for sales binders to educated sales people.

Making Presentation Files Smaller

 Prior to PowerPoint 97, there was no internal file compression code inside of PowerPoint, and files could get pretty big quickly. The most common cause of large files is the addition of large bitmaps. PowerPoint 97 compresses these bitmaps, but previous versions do not. To keep your presentations as small as you can, try reducing the resolution of your bitmaps, which will bring their size down tremendously. For viewing on screen, the bitmaps don't need to be more than 96 dpi; they won't print nicely until they're up around 150 or higher, but the screen always displays at 96 dpi, so if the primary viewing medium is the screen, there's no point in having the bitmaps be a higher resolution. Also, the bitmap format can make a big difference to your file sizes. JPEG and PNG both have good internal compression code. GIF has some, but not as good as JPEG. BMP files are the largest; TIFF files will also be very large.

Sometimes, as you're working on a presentation, you'll notice that the file seems to get bigger for no reason.  To get rid of this "bloating", save the file using "File/Save As" and give the file a new name.  This can reduce the file size up to 50%.

Building Presentations for Distribution to Others

  If you're making a PowerPoint presentation that you intend to distribute to lots of different people, here are some important things to watch out for that will cause problems:

1. Stick with the fonts that come installed with Windows; Fancy fonts that appear on your machine will cause problems if everyone else doesn't have them.

2. Avoid embedding sounds and videos: these will not go from Mac to Windows gracefully, and you have to be very careful about how you insert the files in order to get them to "travel" properly. See the FAQ section for more information on this.

3. Try looking at the presentation on a different platform (Mac vs Windows); be prepared for some visual changes in your file--the version or platform may not support some of the features you've put in, so be sure to sanity check your file on several different machines and versions BEFORE you distribute it!

Easily Changing from Caps to Lower Case (or Vice Versa)

 If you have text that is in the wrong case, select the text, and then click Shift+F3 until it changes to the case style that you like. Clicking Shift+F3 toggles the text case between ALL CAPS, lower case, and Initial Capital styles. You'll be surprised how often you use this once you get the hang of it!

Nudging Objects

 You can use the arrow keys to move objects very small distances. This is a big win for those laptop users who no longer have mice. Select the object, then use your arrow keys. Each press of the key will move the object on "grid unit" (1/12th of an inch, don't ask why); if you hold down the ALT key while nudging, or if you have the grid turned off, you can move the objects one pixel at a time.

Saving Across Multiple Diskettes

 From the File menu, select Pack and Go. This wizard will compress your PowerPoint presentation and copy the file onto as many floppies as are necessary.  Be sure to format a bunch of floppies BEFORE you start the process, and make sure they are empty.  This feature requires PowerPoint 95 or higher.

Subliminal Messages

These can be pretty hysterical in the right circumstances. Create a text object. With the text object selected, click on the Animation Effects button on the tool bar (the one that looks like a yellow star), and then click on the "flash once" button. Go to slide show and see the message quickly flash and then disappear.

Editing Drawings

Anything you draw with the pencil tool, you can edit. To get the object into "points mode", either double-click on the object, or select it then hit the Enter key. You will then see points at every vertex, which you can move. You can add points by holding down the shift key and clicking, you can subtract points by holding down the ALT key while clicking, and you can of course just drag points around.