Friday 2 May 2008

MSOutlook Alert

How to make outlook alert before sending mail with no subject

Alerting can be made only as a hotfix by writing some macro

No option available on Outlook to enable this feature

Steps:-

1) Open outlook

2) Press Alt+F11 (VB Editor will be opened)

3) Expand the "Project1"

4) Expand "Microsoft Office Outlook"

5) double click on "ThisOutlookSession"

6) Now paste the following code


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

Dim strSubject As String

strSubject = Item.Subject

If Len(Trim(strSubject)) = 0 Then

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

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

Cancel = True

End If

End If

End Sub


7) Save and close VB Editor

8) Close Outlook and when asked to save the macro in "ThisOutlookSession" select "yes".

9) Now open outlook and when asked to enable macros select "Yes"

Problem solved

Wednesday 23 January 2008

Enabling shift key in MsAccess




Enabling shift key in MsAccess ?


By : Saif Ikram

Published on : 23-January-2008




Microsoft Office Access, previously known as Microsoft Access, is a relational database management system from Microsoft which combines the relational Microsoft Jet Database Engine with a graphical user interface and software development tools. It is a member of the 2007 Microsoft Office system.


Access can use data stored in Access/Jet, Microsoft SQL Server, Oracle, or any ODBC-compliant data container. Skilled software developers and data architects use it to develop application software. Relatively unskilled programmers and non-programmer "power users" can use it to build simple applications. It supports some object-oriented techniques but falls short of being a fully object-oriented development tool.


Applications developed Ms-access are secure in some aspects when the shift key is disabled.
But once disabled cannot be recovered, which means developer cannot access the source code or cannot make any changes.


To avoid this, application should itself provide an option to enable the shift key at least for an administrator.


The following code snippet helps you to enable/disable shift

 Sub EnableShiftKey()

Dim db As DAO.Database
Dim prp As DAO.Property

Set db = CurrentDb
db.Properties.Delete "AllowBypassKey"
Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, True, True)
db.Properties.Append prp

db.Properties.Refresh

Set prp = Nothing
Set db = Nothing

End Sub

Just change the value from True to False to disable shift button