Sponsor Message:
Non Aviation Forum
My Starred Topics | Profile | New Topic | Forum Index | Help | Search 
Are You Good With Word? Real Good?!  
User currently offlineTWISTEDWHISPER From Sweden, joined Aug 2003, 711 posts, RR: 2
Posted (8 years 4 months 2 weeks 13 hours ago) and read 1584 times:

Here's one for those of you that consider yourselves to be advanced Word users.

I have a form that I need to fill out like 10-15 times per day. In this form there are 6 different fields that I need to put following information in (example text within the brackets:

Flight# (SK943/08)
E.T.A (1830/08)
Master AWB# (117-40503033)
Destination (ORD)
Exit Gateway (CPH)
Special Instructions (KEEP COLD ON ARRIVAL)

Today I use a function where you press F11 to move the marker to the next field, but what I want is a dialogue box with a brief explanation of what needs to be filled in and in what format, i.e. "Please enter the estimated time of arrival in following format: HHMM/DD" and a text box where you enter the data requested and press OK. The text is then transferred to the appropriate box and the next dialogue box comes up, i.e. "Enter flight and date in following format: XX000/DD where XX is carrier code, 000 is flight No and DD is the flight date"

Is there a way to do this without using macros? Does anyone have a ready code example to send me? You can send it to ehagglun@hotmail.com, put airliners.net in the subject....


Read between the lines.
5 replies: All unread, jump to last
 
User currently offlineAndz From South Africa, joined Feb 2004, 8416 posts, RR: 11
Reply 1, posted (8 years 4 months 2 weeks 10 hours ago) and read 1536 times:
Support Airliners.net - become a First Class Member!

hmm, if you had put this through the grammar checker it would have suggested replace "real good" with "really good"

Sorry, I couldn't help it but someone had to get your thread back to the top!



After Monday and Tuesday even the calendar says WTF...
User currently offlineAeroWesty From United States of America, joined Oct 2004, 20322 posts, RR: 63
Reply 2, posted (8 years 4 months 2 weeks 10 hours ago) and read 1529 times:

What you're really trying to do is make a word processor work like a database app, right? Why don't you just use a database app instead?


International Homo of Mystery
User currently offlineFr8Mech From United States of America, joined Sep 2005, 5098 posts, RR: 12
Reply 3, posted (8 years 4 months 2 weeks 4 hours ago) and read 1496 times:

If I'm not mistaken, it is possible to do exactly what you say in Excel. I've seen it done, but don't know how to do it.


When seconds count...the police are minutes away. Never leave your cave without your club.
User currently offlineNoelg From , joined Dec 1969, posts, RR:
Reply 4, posted (8 years 4 months 2 weeks 3 hours ago) and read 1482 times:

The only way you will do this is by creating a macro in VBA and setting it to run when you enter the field. Pretty straightforward:

In the VBA editor, you need to create a userform for each textbox (rt click on the "Project" pane in top left, Insert, Userform).

Design your form with question and textbox using the properties pane on the bottom left to name the question etc.

Add a button for OK, assign the following code:

ActiveDocument.FormFields.Item("text1").Result = UserForm1.TextBox1.Value
UserForm1.Hide

Add a cancel button if you wish with:
UserForm1.Hide

as the code.

Where "text1" is the name of your textbox in Word, UserForm1 is the name of your userform and Textbox1 is the name of the textbox.

In the VBA editor, add a new Sub with the following lines:

Sub Text1ShowUserform()
UserForm1.Show

End Sub

Finally, in the Word Document itself, in the textbox properties under the "Run macro on entry", select "Text1showuserform" from the list.

You should then get something like this:

http://www.marshgiddings.com/aviation/fieldautomationexample.doc

In this example only the first field is automated, so if you tab to the second field and Shift+tab back you will get your result.

Not entirely sure how to set the focus automatically to the next field though, the SetFocus function seems to only work for the window rather than individual controls.

All the code is there!

Hope this helps.

Cheers,
Noel


User currently offlineSpinalTap From New Zealand, joined Mar 2005, 440 posts, RR: 0
Reply 5, posted (8 years 4 months 2 weeks ago) and read 1447 times:

A simple but not particularly elegant way would be to use Excel and Insert comments in the cells where data is to be entered. Comments can be entered by right clicking on a cell then selecting "Insert comment" from the menu. The comments will then appear when you run the mouse cursor over the cell.

Otherwise its VBA I'm afraid. It can be done very easily if you have a basic knowledge of VBA or another modern programming language but if you are completely unfamiliar with any programming language it may seem difficult.



"I get what they call a stipend, a stipend is like money but its such as small amount they don't really call it money"
Top Of Page
Forum Index

This topic is archived and can not be replied to any more.

Printer friendly format

Similar topics:More similar topics...
Are You A Good Cook? posted Wed Dec 21 2005 20:08:25 by 9VSPO
So, Are You A Progessive Man Or A Real Man? posted Fri Apr 30 2004 23:23:21 by MD-90
After 2 Years Are You Happy With The Euro posted Mon Jan 26 2004 13:24:30 by F.pier
Saab And Volvo, What Are You Thinking With? posted Thu Jan 17 2002 21:10:38 by SK A340
Good Book Tips / What Are You Reading! posted Tue Oct 25 2005 14:15:19 by PipoA380
Are You With Sirius Or XM? posted Wed Nov 29 2006 20:57:03 by STLGph
Are You Glad Your Kids Will Deal With The Future? posted Fri May 5 2006 05:32:11 by AerospaceFan
C.USA Officials Are Not Good Enough For Bowl Games posted Mon Jan 2 2006 20:50:14 by Planespotting
How Fast Are You With Your Mouse? - Cool Test. posted Fri Nov 4 2005 04:52:57 by Mr Spaceman
New Portable XM Radios - Are They Good? posted Fri Jul 15 2005 03:26:30 by DeltaFFinDFW