Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

is there a way to make a drop down with a set of programed insert

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Butkus - 08 Jul 2007 16:52 GMT
I would like to create a drop down in a standard letter with program
responces to just click in to fill in a letter real quick if it is possible
alborg - 08 Jul 2007 17:44 GMT
Hi Butkus:

After you place your dropdown onto your letter, do the following-

1) View-> Toolbars-> "Visual Basic"
2) Right click on your project (viewed in the Project Window) and select
Insert-> Module
3) In the module workspace for "Module1" (or whatever you call it), put in a
sub routine such as-

Sub SelectLetter()
Dim ffld As Word.FormField, xx As String
Set ffld = ActiveDocument.FormFields(1)
Select Case ffld.Result
  Case "Business"
       xx = "Dear Sir: "
  Case "Personal"
       xx = "Hi Mom! "
  '...
  '...
End Select
ActiveDocument.Bookmarks("bkTest").Range.Text = xx
End Sub

4) Add in a bookmark where you want your letter/paragraph to go. We'll call
it "bkTest" as referenced above.
5) Now get out of the Visual Basic Interface and right click on your
dropdown item and select "Properties".
6) Click on "Run Macro on..." area, under "Exit" and select the
"SelectLetter" macro from the list.
7) Click on the "Drop-down item:" area and add "Business"-> Add>>, then
"Personal"-> Add>>
8) Press "OK".
9) Test your app... remember to lock your form!

Cheers,
Al

> I would like to create a drop down in a standard letter with program
> responces to just click in to fill in a letter real quick if it is possible
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.