#1   Report Post  
Posted to microsoft.public.word.docmanagement
owen owen is offline
external usenet poster
 
Posts: 61
Default UserForm Question

I am using a template document to automatically start a user form in Word 2003.

The user form contains command buttons, each command button opens a specific
template document.

Once the command button is clicked, the required document opens, however the
user form needs to be closed before the document can become active.

Is there a code that can be placed within my original template document
which automatically deactivates the user form and allows the selcted document
to become active?

I do not necessarily want to close the user form, just deactivate it so i
can use the opened document.

Regards
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default UserForm Question

Use the .Hide command on the userform or change the mode in which the
userform is opened by adding vbModeless after the Show command

Show vbModeless

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
news
I am using a template document to automatically start a user form in Word
2003.

The user form contains command buttons, each command button opens a
specific
template document.

Once the command button is clicked, the required document opens, however
the
user form needs to be closed before the document can become active.

Is there a code that can be placed within my original template document
which automatically deactivates the user form and allows the selcted
document
to become active?

I do not necessarily want to close the user form, just deactivate it so i
can use the opened document.

Regards



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
owen owen is offline
external usenet poster
 
Posts: 61
Default UserForm Question

Thanks Doug

The UserForm.Hide worked.

Another question, when my UserFrom initially displays on screen, the window
is not active by default (ie the top caption bar is grey). Is there a command
to automatically make the UserForm window active (top caption bar is blue)?

Thanks again for your help.

"Doug Robbins - Word MVP" wrote:

Use the .Hide command on the userform or change the mode in which the
userform is opened by adding vbModeless after the Show command

Show vbModeless

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
news
I am using a template document to automatically start a user form in Word
2003.

The user form contains command buttons, each command button opens a
specific
template document.

Once the command button is clicked, the required document opens, however
the
user form needs to be closed before the document can become active.

Is there a code that can be placed within my original template document
which automatically deactivates the user form and allows the selcted
document
to become active?

I do not necessarily want to close the user form, just deactivate it so i
can use the opened document.

Regards




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default UserForm Question

How are you getting the userform to show?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
...
Thanks Doug

The UserForm.Hide worked.

Another question, when my UserFrom initially displays on screen, the
window
is not active by default (ie the top caption bar is grey). Is there a
command
to automatically make the UserForm window active (top caption bar is
blue)?

Thanks again for your help.

"Doug Robbins - Word MVP" wrote:

Use the .Hide command on the userform or change the mode in which the
userform is opened by adding vbModeless after the Show command

Show vbModeless

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
news
I am using a template document to automatically start a user form in
Word
2003.

The user form contains command buttons, each command button opens a
specific
template document.

Once the command button is clicked, the required document opens,
however
the
user form needs to be closed before the document can become active.

Is there a code that can be placed within my original template document
which automatically deactivates the user form and allows the selcted
document
to become active?

I do not necessarily want to close the user form, just deactivate it so
i
can use the opened document.

Regards






  #5   Report Post  
Posted to microsoft.public.word.docmanagement
owen owen is offline
external usenet poster
 
Posts: 61
Default UserForm Question

I have my document template linked to ashortcut on the desktop. When i
activate the template, the following code is used:

Sub autonew()
Application.WindowState = wdWindowStateMinimize
Selection.Document.Close
UserForm2.Show
End Sub

It minimses Word and closes the document which is opened from the template.
I did this because i only wanted the User Form to show on the screen and not
Word.

Thanks

"Owen" wrote:

Thanks Doug

The UserForm.Hide worked.

Another question, when my UserFrom initially displays on screen, the window
is not active by default (ie the top caption bar is grey). Is there a command
to automatically make the UserForm window active (top caption bar is blue)?

Thanks again for your help.

"Doug Robbins - Word MVP" wrote:

Use the .Hide command on the userform or change the mode in which the
userform is opened by adding vbModeless after the Show command

Show vbModeless

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
news
I am using a template document to automatically start a user form in Word
2003.

The user form contains command buttons, each command button opens a
specific
template document.

Once the command button is clicked, the required document opens, however
the
user form needs to be closed before the document can become active.

Is there a code that can be placed within my original template document
which automatically deactivates the user form and allows the selcted
document
to become active?

I do not necessarily want to close the user form, just deactivate it so i
can use the opened document.

Regards






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default UserForm Question

Doing a bit of experimenting, I find that if in the Initialize event of the
form, I use the SetFocus command to set the focus to one of the controls on
the form, I then do not need to click twice on the form to activate any
other control.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
...
I have my document template linked to ashortcut on the desktop. When i
activate the template, the following code is used:

Sub autonew()
Application.WindowState = wdWindowStateMinimize
Selection.Document.Close
UserForm2.Show
End Sub

It minimses Word and closes the document which is opened from the
template.
I did this because i only wanted the User Form to show on the screen and
not
Word.

Thanks

"Owen" wrote:

Thanks Doug

The UserForm.Hide worked.

Another question, when my UserFrom initially displays on screen, the
window
is not active by default (ie the top caption bar is grey). Is there a
command
to automatically make the UserForm window active (top caption bar is
blue)?

Thanks again for your help.

"Doug Robbins - Word MVP" wrote:

Use the .Hide command on the userform or change the mode in which the
userform is opened by adding vbModeless after the Show command

Show vbModeless

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
news I am using a template document to automatically start a user form in
Word
2003.

The user form contains command buttons, each command button opens a
specific
template document.

Once the command button is clicked, the required document opens,
however
the
user form needs to be closed before the document can become active.

Is there a code that can be placed within my original template
document
which automatically deactivates the user form and allows the selcted
document
to become active?

I do not necessarily want to close the user form, just deactivate it
so i
can use the opened document.

Regards





  #7   Report Post  
Posted to microsoft.public.word.docmanagement
owen owen is offline
external usenet poster
 
Posts: 61
Default UserForm Question

Thanks for your help on this one.

"Doug Robbins - Word MVP" wrote:

Doing a bit of experimenting, I find that if in the Initialize event of the
form, I use the SetFocus command to set the focus to one of the controls on
the form, I then do not need to click twice on the form to activate any
other control.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
...
I have my document template linked to ashortcut on the desktop. When i
activate the template, the following code is used:

Sub autonew()
Application.WindowState = wdWindowStateMinimize
Selection.Document.Close
UserForm2.Show
End Sub

It minimses Word and closes the document which is opened from the
template.
I did this because i only wanted the User Form to show on the screen and
not
Word.

Thanks

"Owen" wrote:

Thanks Doug

The UserForm.Hide worked.

Another question, when my UserFrom initially displays on screen, the
window
is not active by default (ie the top caption bar is grey). Is there a
command
to automatically make the UserForm window active (top caption bar is
blue)?

Thanks again for your help.

"Doug Robbins - Word MVP" wrote:

Use the .Hide command on the userform or change the mode in which the
userform is opened by adding vbModeless after the Show command

Show vbModeless

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Owen" wrote in message
news I am using a template document to automatically start a user form in
Word
2003.

The user form contains command buttons, each command button opens a
specific
template document.

Once the command button is clicked, the required document opens,
however
the
user form needs to be closed before the document can become active.

Is there a code that can be placed within my original template
document
which automatically deactivates the user form and allows the selcted
document
to become active?

I do not necessarily want to close the user form, just deactivate it
so i
can use the opened document.

Regards






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UserForm Macro Eric Microsoft Word Help 1 June 3rd 08 10:55 AM
userform question Erik Witkop Microsoft Word Help 7 May 16th 08 01:03 AM
Userform question (selecting name will self complete fields) Darren Ingram Microsoft Word Help 1 April 23rd 08 12:46 PM
Userform Sharpe Microsoft Word Help 1 March 17th 06 06:13 AM
Userform in word SuzieQ Microsoft Word Help 2 December 12th 05 09:42 PM


All times are GMT +1. The time now is 04:32 PM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"