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 / January 2007

Tip: Looking for answers? Try searching our database.

Simple Question (Switching between Windows)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
frank - 31 Jan 2007 00:32 GMT
I have an easy one.  I have two documents open.  One called "New Document"
the other called "Transcript".  I need a way to switch back and forth between
documents using the document names and not the window numbers (windows(1)).  

I need to use document names because these two documents might be different
numbers depending on which one I open first.  

I'm using a macro to copy text from one and pasting to the other.  That's
why I need some way to activate one doc to copy text then activate the other
to paste the text.

Thanks
Perry - 31 Jan 2007 01:15 GMT
I don't use names or index numbers for documents, although you can do it
this way...
I use pointers or object variables pointing to documents (or their windows)

Exmpl

set doc1 = documents.add
set doc20 = documents.open("c:\temp\transscript.doc")

'regardless how many documents are open, below line will never fail
'when it comes to localising either source- or destination document
'and you don't need names to do so ...

doc1.content = doc20.content

But again, as stated, you can also use the names and or index numbers to
identify the documents.

Krgrds,
Perry

>I have an easy one.  I have two documents open.  One called "New Document"
> the other called "Transcript".  I need a way to switch back and forth
[quoted text clipped - 12 lines]
>
> Thanks
frank - 31 Jan 2007 01:24 GMT
That's perfect Perry.  Thank you so much!

> I have an easy one.  I have two documents open.  One called "New Document"
> the other called "Transcript".  I need a way to switch back and forth between
[quoted text clipped - 8 lines]
>
> Thanks
 
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.