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 / October 2003

Tip: Looking for answers? Try searching our database.

Setting text form field properties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dawn R. - 30 Oct 2003 01:50 GMT
Does anyone know how to set the properties of a text form
field (ie, the fill-in field you can put in using
the "Forms" toolbar) using VBA? I'm one of those folks
making little macros with the macro recorder instead of
programming.  Unfortunately, the only way that I know of
(or can find in help files) to set the text form field
properties is by double-clicking on the field to get the
dialog box to pop up.  But, as you all know, the macro
recorder doesn't want to record anything mouse-based.

Any known keyboard or menu-driven way to get that field
form properties dialog box?  Or if there are programming
ways to set these properties, maybe one of you kind souls
could try to tell me how?

Thanks in advance (the MVPs that respond to these emails
are so fantastic.  I still can't beleive the amount of
time you're willing to devote to helping folks on this
board -- lucky for me!)  Thanks!

--Dawn Rhoads
Jezebel - 30 Oct 2003 02:19 GMT
Read help on the Dialogs collection.

> Does anyone know how to set the properties of a text form
> field (ie, the fill-in field you can put in using
[quoted text clipped - 17 lines]
>
> --Dawn Rhoads
Dawn R. - 30 Oct 2003 17:27 GMT
Thanks... I tried looking at the help in Visual Basic
for "dialogs collection", which to be honest, is over my
head, but if I looked at it right, it seemed to be about a
way to get the dialog box to show up as part of the
macro?  (presumably, to allow the user to make settings or
choices that they'd want?)  That's not what I'm trying to
do in my case.  I want to insert some text form fields in
my document, using a macro, that have certain properties.  
In particular, I want a couple of the fields to have
default text.  The only place I know to set that field
property in Word itself is with the dialog box, which I
can't get to while recording my macro, since the macro
recorder won't recognize the mouse clicks.

Sorry if I've missed the point of the help file.  I'm one
of those folks who knows just enough about VBA to be a bit
dangerous, but I'm definitely no programmer.

Thanks again for any further light you might be able to
shed on this question!

--Dawn

>-----Original Message-----
>Read help on the Dialogs collection.
[quoted text clipped - 22 lines]
>
>.
Jezebel - 30 Oct 2003 21:30 GMT
No, read the help more closely. There are three basic things you can do with
dialogs:

1) display and act on the dialog (which is what Word normally does).
2) display the dialog but not take any action (your code can then read the
values the user entered and act on them however you like).
3) set the dialog values and 'do' the dialog action, without displaying it
at all (this is the one you want).

> Thanks... I tried looking at the help in Visual Basic
> for "dialogs collection", which to be honest, is over my
[quoted text clipped - 50 lines]
> >
> >.
Dawn R. - 30 Oct 2003 22:39 GMT
Thanks again... I think I wasn't in the right help section
before (the help section I found on "dialogs collection"
was one page, not much detail, but was talking about
message boxes)  I think I found the section you're
referring to (under "displaying built in Word dialog
boxes"?), but it's definitely beyond my ability to figure
out -- I don't have enough programming knowledge to even
read the darn help files!  Dang!  Thanks anyway for trying
to point me in the right direction, I appreciate your time.

--Dawn
>-----Original Message-----
>No, read the help more closely. There are three basic things you can do with
[quoted text clipped - 62 lines]
>
>.
Dawn R. - 30 Oct 2003 22:55 GMT
Wow, I spoke too soon.  I did figure out how to do this
after looking at some anoter help file as well.  The two
sections that helped were "Built in Word Dialog Boxes"
and "Built in dialog box argument lists".

So, for anyone else who might be interested, here's the
code I came up with that seems to work to set the default
text of a highlighted field:

   With Dialogs(wdDialogFormFieldOptions)
       .TextDefault = "1"
       .Execute
   End With

Thanks, Jezebel for putting me on the right track, I
appreciate it!

--Dawn

>-----Original Message-----
>No, read the help more closely. There are three basic things you can do with
[quoted text clipped - 62 lines]
>
>.
 
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.