Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12-06-2018, 02:45 AM
eduzs eduzs is offline Windows 10 Office 2010 32bit
Competent Performer
 
Join Date: May 2017
Posts: 103
eduzs is on a distinguished road
Default Last focused document?


When I open a .DOCM file a need to past some text in the last focused document.
Is there a way in VBA to retrieve the last focused document, instead of the activedocument?
Thanks
__________________
Backup your original file before doing any modification.
Reply With Quote
  #2  
Old 12-06-2018, 01:55 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,680
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

The macro here: http://www.msofficeforums.com/word/3...tml#post128975 shows how to positively identify whatever document is active when you start a macro and how to positively identify whatever document is opened by the macro.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to transfrom a legal word document format to letter size document Soona Word 4 04-19-2018 05:54 AM
From a docx report document save all images in a cell from the document to a folder censura Word VBA 1 05-13-2017 12:54 AM
Single step Word Styles from Source Document through entire Destination document? xbliss Word 6 08-27-2016 09:36 PM
Adding a link into a word document that when pressed, takes user to a page within the same document yan89 Word 1 04-29-2016 01:54 PM
split word document based on bookmarks with each new document title of the bookmark megatronixs Word VBA 8 06-03-2013 08:16 PM


All times are GMT -7. The time now is 01:00 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft