Collect information from Email using MS Access

This post is to collect information from a number of people easily.
This can be used in offices, surveys, members, family or friends(Personal).
 Using this method we can mail users to fill a form for specific information. the fields of the Access table will sent to specific users vie Email when user replies that mail that information automatically added or updated in the Access table.

Step 1.
Create One table in MS Access (I used 2007 here) with the Fields you want to collect from the user. I create here a table with following fields.



 Step 2.
 Now there are two ways to send this mail.
1. Send the mails to the data of email field in the table. (Used for update table data.)
2. Send the mails to the email addresses in the outlook or custom. (New Information)

We use the second method here.

Right click on the table name and click Collect and Update Data vie E-mail.

This will open an wizard.

Step 3.
Follow the wizard as below...

Click Next ...

In this step select HTML Form. This will generate Html form. In case you and all the members(whom you want to participate in this must have MS Infopath installed to reply your form.
Click Next...

Add all the fields from "Fields in table" to "Fields to Include in e email message" you want to ask to the members.You can exclude fields if required.
Click Next...
Don't forget to Chek the checkbox saying "Automatically process replies and add data to Collect Information" this allows to update the information from receiving mail to your database.
Click Next...

Select first option "Enter the e-mail addresses in Microsoft Outlook" to collect mail id from outlook (for new database) or
select second option "Use the e-mail addresses stored in a field in the database." to collect mail id from database itself.(for data updating purpose)
In our case we select the first option. For second option you need one field in the database with datatype "Hyperlink".

Click Next...
Type the Subject and Custom Message in this form and
Click Next...


This is the final Step Click Create Button to create Emails.

This will create one email message as shown in the image with subject and Custom Message.
Now select the email addresses from your outlook and send the mail to the Members.

Step 4
Step 4 is very nice you have nothing to do in this step.
When your users send reply to this mail their data will automatically update in the database.

Members see this type of email

You need to inform your first time user just to Reply this mail with filled details. As i done above.
When outlook gets the replied mail it will directly update the data in the Access table and not show any Mail in the outlook inbox (no burdon on outlook).
You can see the received information in the Access Database.



If you need any further information please comment on this or mail me....

Nice Layout Creator - MokeUp


Hi, Here is a nice MokeUp creator.
We can create nice layouts from this very easily.
It provide tools to make layouts for website, hand design web template mokeup, Flow Chart, Office etc. 

It's Free Enjoy...
Submitted By Nipesh Shah @ 10/13/2011 8:01:27 PM

Clipboard to Copy Image in C# ,Net

To Copy the Image on the Clipboard the code would be..

First we need to open a Image File using OpenFileDialog.

1) Create an Object of OpenFileDialog , two Button and one PictureBox on the windows form

2) From the first button click event copy the Image to the Clipboard using the code below.

if (openFileDialog1.ShowDialog() == DialogResult.OK)

{

Image imageForCopy = Image.FromFile(openFileDialog1.FileName);

Clipboard.SetImage(imageForCopy);

}

3) From the second button click event set the Image from Clipboard to the Picture Box and clear the Clipboard.

pictureBox1.Image = Clipboard.GetImage();

Clipboard.Clear();


Submitted By Nipesh Shah @ 10/5/2011 12:04:22 PM

Using Clipboard to Copy and Paste Text

To Copy the Text on the Clipboard the code would be..

String sourceText = "Some Text";

Clipboard.SetDataObject(sourceText, true);

To Set the Text from the Clipboard the code would be..

string destinationText;

if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))

destinationText = Clipboard.GetDataObject().GetData(DataFormats.Text).ToString();

else

destinationText = "The clipboad does not contain any text";


Submitted By Nipesh Shah @ 10/5/2011 11:46:32 AM

LDAP Authentication - Lightweight Directory Access Protocol

Using the below function we can authenticate the user using LDAP.

LDAP is a Lightweight Directory Access Protocol it is an Internet protocol that email and other programs use to look up information from a server user.

LDAP is an application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network.

LDAP is defined in terms of ASN.1 and transmitted using BER.

using System.DirectoryServices;

public static bool IsLDAPAuthenticate(string userName, string password, string domainName, out string errorMessage)

{

bool IsAuthenticate = false;

errorMessage = string.Empty;

try

{

DirectoryEntry LDAPEntry = new DirectoryEntry("LDAP://" + domainName, userName, password);

object nativeObject = LDAPEntry.NativeObject;

IsAuthenticate = true;

LDAPEntry.Close();

}

catch (Exception exception)

{

errorMessage = String.Format("{0}({1})", exception.Message, domainName);

}

return IsAuthenticate;

}


Submitted By Nipesh Shah @ 10/4/2011 5:50:08 PM

Open CD Rom Drive using C# Code

The below code is used to open CD Rom Drive

//Namespace need to referenced

using System.Text;

using System.Runtime.InteropServices;

//Win32 Api need to call

//Write this as a function

[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi)]

protected static extern int mciSendString(string lpstrCommand,StringBuilder lpstrReturnString,int uReturnLength,IntPtr hwndCallback);

//Call the below function from any of the function where you want to open the CDRom Drive

int ret = mciSendString("Open CD door", null, 0, IntPtr.Zero);


Submitted By Nipesh Shah @ 10/3/2011 10:30:07 AM

Search This Blog

Link Within Related Posts Plugin for WordPress, Blogger...