Switch documents with open userform 
Author Message
 Switch documents with open userform

Hi,

Is it possible to switch to another document while a userform is opened in
your active document??

Thanks,

Ellen



Tue, 13 Jan 2004 23:11:50 GMT  
 Switch documents with open userform
Hi Ellen,

Quote:
> Is it possible to switch to another document while a userform is opened in
> your active document??

Version of Word?
Purpose, or a more descriptive explanation, please?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Wed, 14 Jan 2004 18:28:45 GMT  
 Switch documents with open userform
It's Word 97

What I want is this:
I open a document based on a template, by opening a userform is initialized.
To fill out the userform I need some information from another (open) Word
document. Can I switch to that other document without closing the userform??



Quote:
> Hi Ellen,

> > Is it possible to switch to another document while a userform is opened
in
> > your active document??

> Version of Word?
> Purpose, or a more descriptive explanation, please?

> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister
> http://www.mvps.org/word
> http://go.compuserve.com/MSOfficeForum

> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)



Fri, 16 Jan 2004 16:28:23 GMT  
 Switch documents with open userform
Hi Ellen,

Yes and no to your specific question.

If the document is already open, you don't need to "switch to it" to extract
information. You have full access to read and write to any open document, even
if they aren't currently visible on screen. Since you don't mention how the
information is stored so that you can pick it up, I can only give you a
general example on how to work with two documents via VBA. This takes the
complete, formatted content from the document body in the document already
open and puts it in the new document you just created from a template (that's
visible on screen behind your userform):

    Dim docAlreadyOpen as Word.Document
    Dim docCreatedFromTemplate as Word.Document

    Set docCreatedFromTemplate = ActiveDocument
    Set docAlreadyOpen = Documents("The doc name.doc")

    docCreateFromTemplate.Range.FormattedText _
       = docAlreadyOpen.Range.FormattedText

Quote:
> It's Word 97

> What I want is this:
> I open a document based on a template, by opening a userform is initialized.
> To fill out the userform I need some information from another (open) Word
> document. Can I switch to that other document without closing the userform??

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Fri, 16 Jan 2004 16:42:22 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Userform in global.dot on open of document

2. Open Template UserForm as a Document.

3. Userform in global.dot on open of document

4. Referencing a Userform in Open Document event

5. Opening an excel-document from a word-userform

6. Trouble Opening a Word Document with VB.NET,Open member not found in Documents

7. Document Statistics Without Opening a Document

8. Opening Merge Document tries to remerge the document

9. document objects, switch to

10. Switch documents

11. Switching to new document created from template (in VBA)

12. AutoNew UserForm comes up before document?

 

 
Powered by phpBB® Forum Software