rand function in MS Word

A popular trick to surprise friends as
  • Open MS-Word
  • type =rand(200,99)
  • then see what happens
Have you tried the same. If not try now.....
It will print a lot of characters and will take about 200-600 pages depending upon the version of MS-Word you have

Some thinks as it is a drawback of MS-Word
For those who think the same, the answer is the one and only one, it is not a drawback of MS-Word as its a feature of MS-Word.
rand function in MS-Word prints a sample text.
Uses of Sample text:-

  • to test various styles
  • to test various formatting
  • to test feature like mail merge and much more...


Now lets start from basic of this function
I think we all know that Microsoft classifies MS-Word in two categories
  • MS Office 2003 or lower
  • MS Office 2007 or higher like MS Office 2010
This feature also depends accordingly on the versions...


What the sample text will be?
The sample text depends on two things
--> version
--> arguments passed through it
Version
In MS-Word 2003 or lower the text will be consist of no. of lines of a line "The quick brown fox jumps over the lazy dog" which contains all alphabets from 'a' to 'z' in a systematic manner.
In MS-Word 2007 or higher version, the text will be consist of  several lines of MS Word help which gives idea about several features of MS-Word like Insert tab, themes and much more
Arguments Passed
We can use rand functions in three different modes
  • With two arguments
  • With one arguments
  • With no argument
The basic syntax of rand function is
=rand(x,y)
where x represents number of paragraphs,
          y represents number of lines per paragraph

  • When we pass rand function with two arguments it will set the length of line as well as paragraph accordingly
  • When we will pass rand function with one argument , the number of paragraphs will be controlled and the lines per paragraph will be default (3 lines per paragraph for MS-Word 2007 version and higher and 5 lines per paragraph for MS-Word 2003 version or lower)
  • When we will pass rand function with no argument both the value of lines per paragraph and no. of paragraph will be taken as default (3 lines per paragraph for MS-Word 2007 version and higher and 5 lines per paragraph for MS-Word 2003 version or lower)
The maximum value of lines per paragraph can be 99
and the maximum number of paragraphs is 200

Because of this when we type =rand(200,99), MS-Word generates about 200-600 pages in less than 2-3 seconds...

ABC of Zealous Engineer's Life


Zealous Engineer is that type of Engineer which
  • is always ACTIVE
  • is BRAVE to face any problem
  • is always ready for any CHALLENGE
  • has a strategical DESIRE and know path to reach it
  • sees everything by ENGINEER's EYE
  • has a strong FAITH while producing final result
  • takes life as GAME and give their best to prove himself
  • is HONEST in every aspect of live
  • takes INITIATIVE to take towards INTEGRITY
  • takes life as JOURNEY and enjoy it by revealing it
  • has ability to grasp KNOWLEDGE by not bothering about its source
  • is totally dependent  upon LOGIC
  • writes their own MYSTERY
  • talks about NEATNESS
  • is always ready to catch OPPORTUNITY
  • is unchallengeable at PUNCTUALITY
  • is always ready for QUESTIONING to reveal mystery behind a every concept
  • talks in REALITY
  • think before SPEAK
  • reminds other to be TRUTHFUL
  • wants always be in UNITY & INTEGRITY
  • inspires himself to convert VIRTUALITY into REALITY
  • is WISE in behavior
  • takes everything as X=? until not reached at proven and logical answer
  • YEARNS to do something CREATIVE
  • is too much ZEALOUS to explore himself without boundaries



because of which we are known as 
ZEALOUS ENGINEERS........

'con' folder in WINDOWS

Have you ever tried to create a folder at any place in windows of name 'con'?... If not, try it now.......

Can we create 'con' folder in windows? If yes then how. and if not then why?



and the ANSWER is YES as well as NO


We cannot create con folder normally but can create the folder by following a special route too.

Why we cannot create con folder in windows
--------------------------------------------------------

we cannot create any folder by naming it as 'con'. The main reason behind the same is windows follows the rules and regulations of its previous version. Earlier when windows was not there, we all were using DOS operating system. Windows also follows the rule of the same too

'con' was basically used in DOS for "console"

as it was essential for DOS, 'con' was moved to the list of reserved words which we can't use to name any file, folder

Although beside 'con' there are some other reserved words to which windows is following from DOS and cannot be used to name folders or files. Some other reserved names are:-
♦ AUX  -  auxillary device, usually a serial port

♦ NUL  -  Bit bucket device
♦ LPT1 - First Parallel printer port
♦ PRN  - System list device, a parallel port

♦ COM1 - First serial communication port
♦ Drive letter (A: to Z:) and much more



Whenever we will try to use any one name from reserved word list, the name of that folder or file will automatically revert to default, g i.e. its previous one.

Moreover, when we try to name a file of a file of notepad, wordpad, paint or any other, we will generally recieve an error message windows similar to the window which is shown following
Reserved name warning

Now a question occur if it is restriction of windows then is there any way to break it? The answer is YES. As we also find out the way for the same although we are Zealous Engineers.

It can be done by entering some sequence of commands via the command prompt also known as cmd to circumvent the restrictionsof the window OS. Although it is not preferred as it maycause other problems and it is not advisable, especially for untrained and inexperienced users of windows.......

The way to crack this restriction is given below

- Start>run>cmd
- enter "md \\.\d:\con" without quotes
it will create con folder in d: partition 

when you will be able to create con folder you might be confused to use this folder i.e. copy anything to this or remove

to copy:-
- open cmd
- copy \\.\d:\con
it will copy contents from source address to con folder situated in d:

But in cmd you cannot change directory to con folder
to see list of files in con folder use following command
    - open cmd
    - dir \\.\d:\con

At last to delete folder named as con which cannot be deleted normally can be deleted as
    - open cmd
    - del -r \\.\d:\con      
    - type 'y' then enter
    - rd \\.\d:\con


Now the question may arrise to your mind that how it is happening 
Actually we are using the concept of UNC path.
UNC (Universal Naming Convention) describe the comman syntax to describe network resource shared file, directory, or printer. Although this method of creation of con folder will not exist in pur DOS OS. It can be used in windows with no error. The syntax for the same is

\\remotehost\sharefolder\resource
      |                |__________|
      |                           |
      |                          V
      |                        path
     V
Computer name/IP Address

The major question arrises here as now we are not having process on remote host then how this command make sense?

The "." in the command "\\.\d:\con" represents the local server. Now, we are pointing to our own computer as we have all the privillages on every folder to our computer.

now last question may arrise that now why con is not reserved word? the answer for the same is there is no console taken in remote host control. As a result we can create the same

At last. How is it????.....
Reply your views by leaving your comments so that we can post accordingly to your needs as too much things are still waiting to reveal..........

Atlast, We want to say, enjoy your study or work by being More practical as much as u can by breaking all the engineers boundaries although we are ZEALOUS ENGINEERS....................