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

Tip: Looking for answers? Try searching our database.

open form and close document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan UK - 06 Jul 2005 23:43 GMT
I have a document which is set to open and close in order to fire an auto
macro. The problem is that the macro is to open a user form ,and no matter
how many steps I try to install into the code (firing a macro, to fire
another macro, to another that opens the form) the modal nature of the form
prevents the document actually closing. I have tried timers to give some
space between the close document and open form commands but the end product
(modal userform) seems to be over-riding this.
I want the form to be modal as Word may not have the focus at the end of the
process and word may also have more than one instance to which the form does
not apply -plus the form can be difficult to locate for a user if it floats
free .
Ideally I want a way to close the dummy document with the auto macro in that
allows the modal user form to open (for use with another document that will
be in place) and the dummy document to close. Any suggestions?
Jean-Guy Marcil - 07 Jul 2005 01:51 GMT
Alan UK was telling us:
Alan UK nous racontait que :

> I have a document which is set to open and close in order to fire an
> auto macro. The problem is that the macro is to open a user form ,and
[quoted text clipped - 12 lines]
> document that will be in place) and the dummy document to close. Any
> suggestions?

It is an unusual request... What are you trying to do?

Have you tried to store the code in a global template, so that no "dummy"
document would be needed?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Alan UK - 07 Jul 2005 07:21 GMT
The dummy document is opened and closed by third party software to
specifically call the userform macro after a form latter has been created via
a merge.
Due to the properties of form letters this was the easiest way. The userform
is for use with the form letter..if we can solve this annoying glitch (for
me).
I would like to think unusual means interesting in this case? ;-)
I am hoping to have the form letter with a user form open and the dummy
document closed. At the moment I get that only with a non-modal user form,
which is very far from ideal for the reasons already given.

> Alan UK was telling us:
> Alan UK nous racontait que :
[quoted text clipped - 20 lines]
> Have you tried to store the code in a global template, so that no "dummy"
> document would be needed?
Alan UK - 07 Jul 2005 08:20 GMT
And bizarrely I appear to have solved my dillema.

This is possible to acheive by calling a non-modal form to be opened which
contains an on activate timer to call a module opening a modal form.
This leaves a modal form in place against the last (before dummy document)
active word window and no more dummy document.
Using the timer directly to call a modal form via modules did not work, but
now the code on having a non-modal userform to call (initially) seems to do
what I want.
Convoluted, moi?

> Alan UK was telling us:
> Alan UK nous racontait que :
[quoted text clipped - 20 lines]
> Have you tried to store the code in a global template, so that no "dummy"
> document would be needed?
Jean-Guy Marcil - 07 Jul 2005 14:58 GMT
Alan UK was telling us:
Alan UK nous racontait que :

> And bizarrely I appear to have solved my dillema.
>
[quoted text clipped - 7 lines]
> (initially) seems to do what I want.
> Convoluted, moi?

Maybe!

I still do not understand why you cannot have the userform code in the form
letter template itself, or in a global template so that the form letter
could call that code when it is created...?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
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.