Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-22-2014, 04:08 AM
Sorcerer13 Sorcerer13 is offline VBA to identify how Word was invoked Windows Vista VBA to identify how Word was invoked Office 2010 32bit
Novice
VBA to identify how Word was invoked
 
Join Date: Sep 2012
Location: God's Own County
Posts: 16
Sorcerer13 is on a distinguished road
Default VBA to identify how Word was invoked

Hi guys....



Does anyone know if it possible to identify how a Word Document (".docm"/".dotm") was opened from Explorer?

By that I mean if was opened by double clicking on it, or RMC and selecting "Open" from the options?

I'm interested in this because I tend to write a lot of VBA which is invoked by the User double clicking on the file, and then being presented with various options in order to create/complete various documents.
Normally the control is quite tight, so the User is constrained from accessing the VBA via Alt+F11.

When developing the code, I normally invoke it from something like "Sub Main_Process" via Alt+F11 and F5, and insert a commented out call to "Main_Process" in "Private Sub Document_Open()" or "Private Sub Document_New()" for templates.

When going into Production and uncommenting the call to Main_Process from "Private Sub Document_Open()" the User, and I can no longer access the VBA easily, which means I need to have a "Production" version and an "immediately prior to Production" version which I can get at to amend.

I just wondered if I could use the alternate method of opening the document (RMC & Open) to allows access to VBA by detecting it in the "Private Sub Document_Open()" code.

Any ideas, or am I barking up a blue herring?
Reply With Quote
 

Tags
document options, document properties, vba script



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to identify how Word was invoked How do you identify the ID of a picture in PowerPoint? CatMan PowerPoint 4 04-17-2012 03:29 PM
How to identify whether Word 2007 was used to create a document saved as Word 2003 noviceatwork Word 0 03-08-2012 06:40 AM
VBA to identify how Word was invoked identify non-members from two lists rterrain03 Office 5 12-01-2011 01:41 PM
how to identify the word files created using Windows or Mac Operating System? mariaprabudass Word 0 08-06-2010 05:52 AM
C# API to identify the uncommitted changes in Excel and Word document? althafuddeen Excel 0 04-06-2010 07:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:53 PM.


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