Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-06-2018, 02:45 AM
eduzs eduzs is offline Last focused document? Windows 10 Last focused document? Office 2010 32bit
Expert
Last focused document?
 
Join Date: May 2017
Posts: 262
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 offline Last focused document? Windows 7 64bit Last focused document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The macro here: https://www.msofficeforums.com/word/...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
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Last focused document? split word document based on bookmarks with each new document title of the bookmark megatronixs Word VBA 9 09-05-2020 02:29 PM
Last focused document? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:40 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft