Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Sunday, March 24, 2013

Attaching Email Messages in WebMail or OWA

While you are logged in to webmail, right click on the message the you would like to attach.  (For Mac users, hold down ctrl and click on the message.)

Select "Forward as Attachment"


The new message window opens and you should see the message you selected listed in the attached field.

Monday, July 6, 2009

Visual Studio Tips-1


Hi

Here are some useful tips, which will help you a lot while working with VS.

· Cycle the Clip Board:

o Copy few text one by one, then to cycle the clip board(copied items), press Ctrl+Shift+V

o

· Browse with different browsers:

o By default VS will use Internet Explorer as default browser, well you can change the default settings or can browse a particular page with different browser.



· Open Visual Studio from Run Command:

o Run > type “devenv” without quotes > press “ok”

o When you open the VS, mark that, before opening VS, a small splash screen will come, and if you don’t want to see that screen(which can faster opening VS), you can do that doing a small addition in the above command:

§ Type “devenv /nosplash” instead of “devenv”.

Happy coding :)




Friday, July 3, 2009

Open SQL server with one click

Hi

Before reading this post, tell me how your opening SQL server, I mean how many steps its taking… just count… may be from 3-4 clicks… and for opening object explored 2 more .. And opening new query window for a particular database 2 more…

Now I will tell how you can open SQL server (with object explorer, new query window with selected DB) in one lick.

You know how to open it normal way, i mean from Run command, it is “sqlwb”(for sql server 2005) and “ssms”(for sql server 2008).

Open Run command, type:

sqlwb -S ServerName -d DataBaseName -U UserName -p Password

e.g:

sqlwb -S TestServer -d dummyDatabse -U Username_test -p myDummyPassword

To get help for these commands and more type “sqlwb /?” in run command.(“ssms /?” for 2008 sql server).

Happy coding…!!!



kick it on DotNetKicks.com

Wednesday, July 1, 2009

Select Query ... group by Date

Most of the time we use, GROUP BY, in our sql queries, sometimes it may require to write a query Group By Date.

In this case, if the date field is DateTime in your table column, it won’t give correct data because it contains Date + Time, the time part makes difference, so we have to ignore the time part when writing query for group by with Date column.

What what what…????

Relax and see the example below you will understand clearly…

I have a table:

CREATE TABLE [dbo].[Table_1](

[name] [nchar](10) NULL,

[date] [datetime] NULL,

[add] [nchar](10) NULL

)

Note: date may be 2009-02-02 00:00:00.000 or 2009-02-02 08:20:10.000

Now compare both results below:

=======================================================

select date,[name],[add] from Table_1 group by date,[name],[add]

date name add

----------------------- ---------- ----------

2009-02-02 00:00:00.000 a 111

2009-02-02 00:00:40.000 ccc 333

2009-02-02 00:01:00.000 bb 222

2009-02-02 00:07:00.000 aa 66

2009-02-02 01:00:00.000 aaa 77

2009-02-03 00:00:40.000 ddd 444

2009-02-03 00:00:40.000 eee 555


(7 row(s) affected)

=======================================================

select

DATEADD(dd, 0, DATEDIFF(dd, 0, date)) date,

[name],

[add]

from

Table_1

group by

DATEADD(dd, 0, DATEDIFF(dd, 0, date)),

[name],

[add]

date name add

----------------------- ---------- ----------

2009-02-02 00:00:00.000 a 111

2009-02-02 00:00:00.000 aa 66

2009-02-02 00:00:00.000 aaa 77

2009-02-02 00:00:00.000 bb 222

2009-02-02 00:00:00.000 ccc 333

2009-02-03 00:00:00.000 ddd 444

2009-02-03 00:00:00.000 eee 555


(7 row(s) affected)

=======================================================

Look at First column of both restult,in second result all time are set to 00:00:00:000

Observ the first and second column, First result, even though dates are same, they appears to be different, and solution/fix is in second result…

Hope it helps you some where… some time…

Happy coding !!! J



kick it on DotNetKicks.com

Thursday, June 25, 2009

Subject empty alert Message in Outlook express!!!





Subject line is a very important part of an email. Most people prioritize the emails based on the subject line. Unfortunately, most people don’t add a proper subject line to their email. It becomes even worse when they miss the subject line. Here is an outlook macro which will alert you when you try to send an email without a subject line. Here are the steps to implement the macro:

a. Open outlook and press Alt + F11. This will open the Visual Basic Editor

b. Add the following code




N.B.:Check the left side pan (This Outlook session) and dropdowns in Main window ( Application and Item Send ) are choosen...

Private Sub Application_ItemSend(ByVal Item As Object, ByVal Cancel As Boolean)

Dim strSubject As String

strSubject = Item.Subject

If Len(strSubject) = 0 Then

Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"

If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, " Subject") = vbNo Then

Cancel = True

End If

End If

End Sub


c. Save and Close the editor. Next time when you send an email without a subject line, the following alert message will be shown.

clip_image001

This is very useful for me… hope for you too….

Thank you.



kick it on DotNetKicks.com