Tuesday, June 21, 2011

Recall sent mail from outlook 2007

Call back sent mail from outlook 2007


This feature is present in all outlook.
  • Double click on sent mail
  • Click on other Action
  • Click on Recall this mail

Location of saved file from attachment of outlook

Where file gets saved when we open attachment directly from mail of outlook and save it???
where Outlook saves temporary files??


For windows7 you can try:-
C:\Users\<user name>\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\ITLDT431

If above path wont work,Try:-
  • Open some attached .ppt file in outlook mail box(if not present send mail to yourself with .ppt file as attachment)
  • Change something in file
  • Try to save it
  • It will give you one message box with temporary file location...
  • type that file path in address bar (Note:- Don't try to navigate manually)
  • You will find you file there.

Monday, June 20, 2011

Programatically adding column to sharepoint list, code to add column to list


Create new console application in VS and add following code in program.cs file. also add refrence to Microsoft.Sharepoint.dll


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
namespace AddColumntoList
{
    class Program
    {
        static void Main(string[] args)
        {
            do
            {
                try
                {
                    Console.WriteLine("--Add Column to list--");
                    Console.WriteLine("Enter Site URL : ");
                    String str_siteurl = Console.ReadLine();
                    using (SPSite siteColl = new SPSite(str_siteurl))
                    {
                        Console.WriteLine("Site Found");
                        siteColl.AllowUnsafeUpdates = true;
                        using (SPWeb rootweb = siteColl.OpenWeb())
                        {
                            rootweb.AllowUnsafeUpdates = true;
                            //Console.WriteLine("Site Found");
                            Console.WriteLine("Enter List Name: ");
                            string listName = Console.ReadLine();
                            SPList testList = rootweb.Lists[listName];
                            Console.WriteLine("list Found");
                            Console.WriteLine("Enter Column Name: ");
                            String colName = Console.ReadLine();
                            Console.WriteLine("Select Type Of Column:-");
                            Console.WriteLine("1. Single line Text");
                            Console.WriteLine("2. MultiLine Text");
                            Console.WriteLine("Enter Choice number:- ");

                            string typeChoice = Console.ReadLine();
                            switch (typeChoice)
                            {
                                case "1":
                                    SPFieldText newcolumn = (SPFieldText)testList.Fields.CreateNewField(SPFieldType.Text.ToString(), colName);
                                    testList.Fields.Add(newcolumn);
                                    break;
                                case "2":
                                    SPFieldMultiLineText newcolumnMul = (SPFieldMultiLineText)testList.Fields.CreateNewField(SPFieldType.Note.ToString(), colName);
                                    testList.Fields.Add(newcolumnMul);
                                    break;
                            }

Friday, June 17, 2011

javascript to move images on google

Very interesting.... magic of programming
Do try this once

1. Open Internet Explorer
2. Go to Google.com
3. Type "Flowers" or any other nice flower/animal word or anything which search pictures.
4. You will get a page which is having full of images
5. Then delete the URL from the address bar and paste the following script


javascript:R= 0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI= document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position= 'absolute' ; DIS.left=Math. sin(R*x1+ i*x2+x3)* x4+x5; DIS.top=Math. cos(R*y1+ i*y2+y3)* y4+y5}R++ }setInterval( 'A()',5); void(0)


6. press enter
7. See the magic of programming

Google image search --- New feature

Now you can search refrences for image you are having.
You just need to drag drop image in google search box... it will show all relevent link to you.

follow below steps to search image.

1. open http://www.google.com/ and click on image link at top

2. click on Camera button present in search box
3. click on upload an image

4. click on browse and upload image which you want to search
  

and google will search all refrences for that image.

Thursday, June 16, 2011

How to see content of wsp file

For seeing content of wsp file follow below steps:-
1. Go to my computer>tools>Folder Option>View>and uncheck 'hide extension for know file types'
2. now locate wsp file you are having
3. rename extension to .cab
4. double click on that file

now you can see content of wsp file

Monday, June 13, 2011

All stsadm commands syntax

1. stsadm -o activatefeature {-filename relative path to Feature.xml | -name feature folder | -id feature Id} [-url url] [-force]
2. stsadm -o activateformtemplate -url URL to the site collection [-formid form template ID] [-filename path to form template file]
3. stsadm -o addalternatedomain -url protocol://existing.WebApplication.URLdomain -incomingurl protocol://incoming.url.domain -urlzone default, extranet, internet, intranet, custom -resourcename non-web application resource name
4. stsadm -o addcontentdb -url url -databasename database name [-databaseserver database server name] [-databaseuser database username] [-databasepassword database password] [-sitewarning site warning count] [-sitemax site max count]
5. stsadm -o adddataconnectionfile -filename path to file to add [-webaccessible bool] [-overwrite bool] [-category bool]
6. stsadm -o add-ecsfiletrustedlocation -Ssp SSP name -Location URL|UNC -LocationType SharePoint|Unc|Http -IncludeChildren True|False [-SessionTimeout time in seconds] [-ShortSessionTimeout time in seconds] [-MaxRequestDuration time in seconds] [-MaxWorkbookSize file size in Mbytes] [-MaxChartSize size in Mbytes] [-VolatileFunctionCacheLifetime time in seconds] [-DefaultWorkbookCalcMode File|Manual|Auto|AutoDataTables] [-AllowExternalData None|Dcl|DclAndEmbedded] [-WarnOnDataRefresh True|False] [-StopOpenOnRefreshFailure True|False] [-PeriodicCacheLifetime time in seconds] [-ManualCacheLifetime time in seconds] [-MaxConcurrentRequestsPerSession number of requests] [-AllowUdfs True|False] [-Description descriptive text]

Reliance

Andra Pradesh RelianceGSM


AP Reliance GSM Message center number :- +919014000500
AP Reliance GSM GPRS settings for Android OS:-
Name:- netconnect
APN:- rcomnet
MCC :- 405
MNC:-01
Authenticaton Type :- None
APN Type:- internet
All remaning shoud not be set.

Friday, June 10, 2011

STSADM command for Backup and Restore

Backup a Site Collection

In the cmd window navigate to the “C:\Program files\common files\microsoft shared\web server extensions\12\bin” directory.

Type stsadm -o backup -url “http://theurlofthesitecollection” -filename “C:\MyFirstBackup.bak” -overwrite



To Restore a Site Collection

In the cmd window navigate to the “C:\Program files\common files\microsoft shared\web server extensions\12\bin” directory.

Type stsadm -o restore -url “http://theurlofthetargetsitecollection” -filename “C:\MyFirstBackup.bak” -overwrite


you can also restore site at same plce

Thursday, June 9, 2011

Full form of Sharepoint Terminologies

cmp - Contenet migration package
MOSS - Microsoft Ofice Sharepoint server
wss - windows sharepoint services
wsp - windows sharepoint package/ webpart solution package??

Run stsadm.exe command from any command prompt

Type in the following command in command prompt:
C:/>@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH%

Now Run your Command

Use STSADM command to import/export sharepoint site

EXPORT SUBSITE
To export the subsite use the following syntax at the Command Prompt. Open the Command Prompt on the SharePoint server as an administrator if necessary.

C:\>stsadm -o export -url http://www.seattlepro.com/demos -filename DemoSiteBackup -includeusersecurity




IMPORT SUBSITE
Now to import the subsite to a different site use the following syntax at the Command Prompt. Open the Command Prompt on the SharePoint server as an administrator if necessary.

C:\>stsadm -o import -url http://www.techgalaxy.net/demos -filename DemoSiteBackup.cmp -includeusersecurity

Thursday, June 2, 2011

Quering Data Table

Datatable can be sorted using DataTable.Select()

Importing DataTable.Select() method results into another DataTable
Putting the results from a Select() query into another DataTable is often a requirement say for instance if you wanted to bind your results to a control. As mentioned above the Select() method returns an array of DataRows and since DataRows are the main building blocks of DataTables the process is very easy. Steps outlined are:


//copy the schema of source table
DataTable above24 = dt.Clone();

//get only the rows you want
DataRow[] results = dt.Select(”age > 24″);

//populate new destination table
foreach (DataRow dr in results)
above24.ImportRow(dr);



Can’t I just use a DataView instead of calling DataTable.Select()?
You can and DataViews are directly bindable to many controls too, however it is not always the best solution due to the generally accepted believe among many developers that .Select() is much faster than using the DataView equivalent of RowFilter (property). I regularly interchange between the two for a lot of small database projects, however for the projects where I need to be processing a mega amount of data I pretty much stick with .Select() 100% of the time as I reckon it provides real speed (as in seconds, not PC invisible micro time) advantages compared to DataViews




In our particular case with a datatable of 75K rows, the using a dataview with a complex filter was nearly twice as fast as the equivalent select.

SharePoint document metadata not updating

I faced a weird issue today, Metadata for document which has lookup column was not updating even after saving the item. There was no erro...