Circuit Negma

C++, C, VB.NET, PCB, Electronics, Circuit Design

Opt-Out Letter Generator

Posted by Circuit Negma on May 24, 2006


I have designed a program that will generate the following sample letter for all three credit bureaus.

Credit Bureaus: Sample Opt-Out Letter

Be sure to send your letter to ALL three credit bureaus.

Options
Equifax, Inc.
P.O. Box 740123
Atlanta, GA 30374-0123
Experian
Consumer Opt-Out
701 Experian Parkway
Allen, TX 75013
Trans Union Corporation’s
Name Removal Option
P.O. Box 97328
Jackson, MS 39288-7328


Date  

To whom it may concern:

I request to have my name removed from your marketing lists. Here is the information you have asked me to include in my request:

FIRST, MIDDLE & LAST NAME
(List all name variations, including Jr., Sr., etc.)

______________________________
______________________________

CURRENT MAILING ADDRESS

______________________________
______________________________
______________________________
______________________________

PREVIOUS MAILING ADDRESS
(Fill in your previous mailing address
if you have moved in the last 6 months.)
Note: not required by Equifax and Experian.

______________________________
______________________________
______________________________
______________________________

SOCIAL SECURITY NUMBER
Note: not required by Experian.

______________________________

DATE OF BIRTH
Note: not required by Equifax and Experian.

______________________________

 

Thank you for your prompt handling of my request.

 

_____________________________________
 SIGNATURE

 

Software Bugs:
1. Control the font format within cells
2. Check user input syntax and characteristics
3. Check if the file exists
4. check if the file is already opened
 
https://i0.wp.com/cdn-41.cdn.buzznet.com/assets/users11/subspace/default/msg-114843428257-2.jpg

MainFrame.vb:

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

Option Explicit On

Public Class MainForm

Private filename As String

Private astr As String

Private Saveflag As Boolean

Private MyWord As Word.Application

Private WordDoc As Word.Document

Private MyTable As Word.Table

Private MyCell As Word.Cell

Private MyCols As Word.Columns

Private RetSt As String

Private i, ro, co, addressflag As Integer

Private currdate As Date

 

Private Sub clearBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clearBtn.Click

frstTxtBox.Text = “”

midTxtBox.Text = “”

lstTxtBox.Text = “”

currTxtBox.Text = “”

prevTxtBox.Text = “”

ssnTxtBox.Text = “”

‘birthTxtBox.Text = “”

End Sub

Private Sub exitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exitBtn.Click

Dispose()

End Sub

Private Sub okBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles okBtn.Click

 

‘\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

If RadioButton1.Checked = True Then

Me.WindowState = FormWindowState.Minimized

Me.Enabled = False

Call SaveFileName(“doc”, “MS Word Documents”) ‘ Call Save File Dialog to save the output results

progressFrm.Show()

MyWord = CreateObject(“Word.Application”)

WordDoc = MyWord.Documents.Add

MyWord.Visible = True

Call AddressChange(1)

MyWord.Selection.InsertBreak()

Call AddressChange(2)

MyWord.Selection.InsertBreak()

Call AddressChange(3)

‘=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

‘finaly save the file. If the document exists then will be overwriten

WordDoc.SaveAs(filename)

WordDoc.Application.Quit()

WordDoc = Nothing

MyWord = Nothing

progressFrm.Button1.Text = “Process is Done”

ElseIf RadioButton2.Checked = True Then

Call SaveFileName(“txt”, “Text Documents”) ‘ Call Save File Dialog to save the output results

End If

End Sub

Private Sub SaveFileName(ByVal str1 As String, ByVal str2 As String)

On Error GoTo SaveAsErr

‘ display the Save dialog

SaveFileDialog.AddExtension = True

SaveFileDialog.DefaultExt = str1

SaveFileDialog.Filter = str2 + ” (*.” + str1 + “)|*.” + str1

‘ Check if yes or Cancel btn is clicked

‘ get the resulting filename

If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.Cancel Then

filename = “opt-out.” + str1

Else

filename = SaveFileDialog.FileName

End If

SaveAsErr:

Exit Sub

End Sub

Private Sub AddressChange(ByVal flag As Integer)

Dim RetSt As String

RetSt = Chr(13)

MyWord.Selection.Font.Name = “Times New Roman”

MyWord.Selection.Font.Size = 12

MyWord.Selection.Font.Bold = False

MyWord.Selection.Font.Underline = Word.WdUnderline.wdUnderlineNone

MyWord.Selection.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft

Select Case flag

Case 1

astr = “Equifax, Inc.” + RetSt + “P.O. Box 740123” + RetSt + “Atlanta, GA 30374-0123”

Case 2

astr = “Experian” + RetSt + “Consumer Opt-Out” + RetSt + “701 Experian Parkway” + RetSt + “Allen, TX 75013”

Case 3

astr = “Trans Union Corporation’s” + RetSt + “Name Removal Option” + RetSt + “P.O. Box 97328” + RetSt + “Jackson, MS 39288-7328”

End Select

MyWord.Selection.TypeText(astr)

For i = 1 To 2

MyWord.Selection.TypeText(RetSt)

Next i

astr = frstTxtBox.Text + ” “ + lstTxtBox.Text + RetSt + currTxtBox.Text + RetSt

MyWord.Selection.TypeText(astr)

For i = 1 To 2 : MyWord.Selection.TypeText(RetSt) : Next i

currdate = Date.Now

astr = “Date: “ + currdate + RetSt

MyWord.Selection.TypeText(astr)

For i = 1 To 2 : MyWord.Selection.TypeText(RetSt) : Next i

astr = “To whom it may concern: “ + RetSt

MyWord.Selection.TypeText(astr)

For i = 1 To 2 : MyWord.Selection.TypeText(RetSt) : Next i

astr = “I request to have my name removed from your marketing lists. Here is the information you have asked me to include in my request:” + RetSt

MyWord.Selection.TypeText(astr)

For i = 1 To 2 : MyWord.Selection.TypeText(RetSt) : Next i

MyWord.Selection.Font.Size = 11

‘ Build a table

ro = 6 ‘Numbers of rows

co = 2 ‘Numbers of columns

MyTable = MyWord.Selection.Tables.Add(MyWord.Selection.Range, ro, co)

MyCols = MyTable.Columns

MyCols(1).Width = 250

MyCols(2).Width = 250

‘ Fill out the table

MyWord.Selection.Font.Bold = True

MyCell = MyTable.Cell(1, 1) : MyCell.Select() : MyCell.Split(2) : MyWord.Selection.TypeText(“FIRST, MIDDLE & LAST NAME”)

MyCell = MyTable.Cell(2, 1) : MyCell.Select() : MyWord.Selection.TypeText(“(List all name variations, including Jr., Sr., etc.)”)

MyCell = MyTable.Cell(1, 2) : MyCell.Select() : MyWord.Selection.TypeText(frstTxtBox.Text + ” “ + midTxtBox.Text + ” “ + lstTxtBox.Text)

MyWord.Selection.Font.Bold = True

MyCell = MyTable.Cell(3, 1) : MyCell.Select() : MyWord.Selection.TypeText(“CURRENT MAILING ADDRESS”)

MyCell = MyTable.Cell(3, 2) : MyCell.Select() : MyWord.Selection.TypeText(currTxtBox.Text)

MyCell = MyTable.Cell(4, 1) : MyCell.Select() : MyCell.Split(2) : MyWord.Selection.TypeText(“PREVIOUS MAILING ADDRESS”)

MyCell = MyTable.Cell(5, 1) : MyCell.Select() : MyWord.Selection.TypeText(“(Fill in your previous mailing address if you have moved in the last 6 months.)” + RetSt + “Note: not required by Equifax and Experian.”)

If flag = 3 Then

MyCell = MyTable.Cell(4, 2) : MyCell.Select() : MyWord.Selection.TypeText(prevTxtBox.Text)

Else

MyCell = MyTable.Cell(4, 2) : MyCell.Select() : MyWord.Selection.TypeText(“”)

End If

MyCell = MyTable.Cell(6, 1) : MyCell.Select() : MyCell.Split(2) : MyWord.Selection.TypeText(“SOCIAL SECURITY NUMBER”)

MyCell = MyTable.Cell(7, 1) : MyCell.Select() : MyWord.Selection.TypeText(“Note: not required by Experian.”)

If flag = 1 Or flag = 3 Then

MyCell = MyTable.Cell(6, 2) : MyCell.Select() : MyWord.Selection.TypeText(ssnTxtBox.Text)

Else

MyCell = MyTable.Cell(6, 2) : MyCell.Select() : MyWord.Selection.TypeText(“”)

End If

MyCell = MyTable.Cell(8, 1) : MyCell.Select() : MyCell.Split(2) : MyWord.Selection.TypeText(“DATE OF BIRTH”)

MyCell = MyTable.Cell(9, 1) : MyCell.Select() : MyWord.Selection.TypeText(“Note: not required by Equifax and Experian.”)

If flag = 3 Then

MyCell = MyTable.Cell(8, 2) : MyCell.Select() : MyWord.Selection.TypeText(DateTimePicker.Value.ToShortDateString)

Else

MyCell = MyTable.Cell(8, 2) : MyCell.Select() : MyWord.Selection.TypeText(“”)

End If

‘Exit from table

MyCell = MyTable.Cell(10, 2) : MyCell.Select()

MyCell = Nothing

MyWord.Selection.GoToNext(Word.WdGoToItem.wdGoToLine)

For i = 1 To 3 : MyWord.Selection.TypeText(RetSt) : Next i

MyWord.Selection.Font.Size = 12

MyWord.Selection.TypeText(“Thank you for your prompt handling of my request.”)

For i = 1 To 3 : MyWord.Selection.TypeText(RetSt) : Next i

MyWord.Selection.TypeText(“_______________________________”)

MyWord.Selection.TypeText(RetSt)

MyWord.Selection.Font.Bold = True

MyWord.Selection.Font.Size = 10

MyWord.Selection.TypeText(“SIGNATURE of “ + frstTxtBox.Text + ” “ + lstTxtBox.Text)

 

End Sub

Private Sub prevTxtBox_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles prevTxtBox.MouseClick

prevTxtBox.Text = “”

End Sub

End Class

One Response to “Opt-Out Letter Generator”

  1. Found a great Orthodontist in the Allen area, she came highly recommended by several friends, and I was very impressed by the results. Check out this Allen Orthodontist

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: