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 / June 2005

Tip: Looking for answers? Try searching our database.

UserForms - Templates and Documents

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 01 Jun 2005 17:48 GMT
The application starts as a Word template (.dot) file that contains VBA code
and a userform.  When a doc file is created from the dot file on the
development machine, everything works well.

If the doc file is zipped and emailed to another user, the userform and the
line of code that shows the form is stripped.  The VBA editor does show a
reference to source dot file, but that's all.

Without forcing several hundred users to install add-ins or global
templates, is there a way to add the userform to the resulting doc file?

Incidentally, a simple message box would have sufficed, except for a single
problem.  The MsgBox function only allows 1024 characters in the prompt
string, and about 1200 are needed.
Signature

Eric W. Brockway, MCSE

Charles Kenyon - 01 Jun 2005 19:17 GMT
Could you use the Title string to supplement your prompt?

Othewise, you could, with vba, move the form and a supporting module to
documents as a part of a document_new event. Not sure this would be all that
useful, though, given that it would be blocked in the document by macro
security in many instances.
> The application starts as a Word template (.dot) file that contains VBA
> code
[quoted text clipped - 13 lines]
> problem.  The MsgBox function only allows 1024 characters in the prompt
> string, and about 1200 are needed.
David Sisson - 01 Jun 2005 20:02 GMT
> If the doc file is zipped and emailed to another user, the userform and
> the  line of code that shows the form is stripped

Worked as designed.

> Without forcing several hundred users to install add-ins or global
> templates, is there a way to add the userform to the resulting doc file?

Save the dot file as a doc file and distribute.  I would password
protect your code.  But as Charles already stated, your end users will
probably have macro security issues.

> problem.  The MsgBox function only allows 1024 characters in the prompt
> string, and about 1200 are needed.

The title property also has a 1024 limit, plus it gets trunicated after
76 characters.

Create a userform with a label.  Make the label as big as you need to
hold your text.

Another option would be to build a Windows help file and link it to the
msgbox.
Charles Kenyon - 01 Jun 2005 20:10 GMT
I was thinking that the Title could hold the some characters, even if
possibly not enough.

Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

>> If the doc file is zipped and emailed to another user, the userform and
>> the  line of code that shows the form is stripped
[quoted text clipped - 19 lines]
> Another option would be to build a Windows help file and link it to the
> msgbox.
 
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.