Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2017, 10:52 AM
eduzs eduzs is offline Retrieve the last activated document name. Windows 10 Retrieve the last activated document name. Office 2010 32bit
Expert
Retrieve the last activated document name.
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default Retrieve the last activated document name.

Is there a way to retrieve the last activated document name?

For example:

I have 3 opened documents:

Doc1, Doc2, Doc3.



Within Doc2 I call a macro that will open Doc4, with Doc4 I need to retrieve the last activated documente name (Doc2, not Doc4 which is the current activated document).

Thanks.
Reply With Quote
  #2  
Old 08-22-2017, 03:11 PM
macropod's Avatar
macropod macropod is offline Retrieve the last activated document name. Windows 7 64bit Retrieve the last activated document name. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Properly written, your macro in Doc 2 will record which document it's being run from and, likewise, which document it has opened. See, for example: https://www.msofficeforums.com/word-...tml#post118412
https://www.msofficeforums.com/word-...html#post84645
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX is not activated when opening Excel2016 sheet Pierrot Excel Programming 0 10-28-2016 03:33 AM
Retrieve the last activated document name. UserForm textbox exit event activated with navigation buttons...why? help? orozvik@yahoo.com Excel Programming 2 05-08-2015 02:50 AM
Hyperlink not activated by footpedal Donone PowerPoint 2 05-05-2014 04:42 AM
Retrieve PPS files uncledewey PowerPoint 2 08-10-2012 09:08 AM
Retrieve the last activated document name. Can I retrieve a deleted folder originale Outlook 1 07-25-2011 07:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:05 PM.


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