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 2006

Tip: Looking for answers? Try searching our database.

Styling Objects In A VBa Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
colin.steadman@gmail.com - 12 Oct 2006 16:01 GMT
I've just opened a Word template that pops up a form to enable you to
quickly create a fax header.  The form looks as thought it originated
from Word 2 as theres loads of 'Wordbasic.' type commands in it and the
form itself is created on the fly from code which is how it used to be
done back in the Word 2 days if I recall, ie:

   WordBasic.BeginDialog 670, 370, "Facsimile Details",
"FacsimileDetails.Dynamic1"
   WordBasic.Text 18, 26, 65, 13, "Recipient:", "Text1"
   WordBasic.TextBox 90, 21, 200, 18, "Recipient"

Anyway, my question is about the styling of this form.  The frames have
rounded edges, the buttons look glassy and the option buttons have blue
marks in them when clicked.  How was this done?  There are a few
styling options in Word 2003 for form objects, but none of them seem to
allow me to emulate this other form.

Anyone know what they did?

Thanks,
Colin
Jonathan West - 13 Oct 2006 10:24 GMT
This is an old Word 95 template and the code was originally in WordBasic,
and was automatically converted to VBA when you opened the template in your
current version of Word. Normally, such automatic conversion is pretty dodgy
and the fact that it works is something of a miracle.

WordBasic had a much more primitive way of handling custom dialogs called
UserDialogs. I would guess that somehow your Windows XP theming has been
applied to the dialog. Even if you like the layout, trying to create
UserDialogs in VBA with no current documentation and no visual editor is
going to be a painfully slow process.

But if you want to try, the most relevant documentation is the Word 95
WordBasic help file. You will need to work out from the code you already
have how the syntax has changed from Wordbasic to VBA. You can download it
from here.

Word 95 WordBasic Help File
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=1A24B2A7
-31AE-4B7C-A377-45A8E2C70AB2


Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

> I've just opened a Word template that pops up a form to enable you to
> quickly create a fax header.  The form looks as thought it originated
[quoted text clipped - 17 lines]
> Thanks,
> Colin
 
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.