Everyone - You might like my VBScript that does the same thing as the batch file mentioned by Doyce. I've uploaded the instructions and sample VBScript file to our Files>Articles_Excerpts folder.
The article was scraped from my dormant website that I hope to bring back up some day. Obviously, any link in the article that points to somewhere on my site will fail but I can give you whatever you need if you let me know.
-Bill
---In MS_Access_Professionals@yahoogroups.com, <duanehookom@hotmail.com> wrote :
Thanks Doyce. Bill's solution is much more elegant than my brute force push a new copy.
Duane
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of winberry.doyce@con-way.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Thursday, February 7, 2019 12:26 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] What is the best way to update front end automatically when a new version is available?
Sent: Thursday, February 7, 2019 12:26 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] What is the best way to update front end automatically when a new version is available?
---In MS_Access_Professionals@yahoogroups.com, <duanehookom@...> wrote :
I think if you change just some of the final lines to:
'Set xlApp = CreateObject("Excel.Application")
'set xlBook = xlApp.WorkBooks.Open(strAppFolder & "\" & strAppFile)
wshshell.Run strAppFolder & "\" & strAppFile
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of qingqinga qingqinga@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Thursday, February 7, 2019 10:15 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] What is the best way to update front end automatically when a new version is available?
Sent: Thursday, February 7, 2019 10:15 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] What is the best way to update front end automatically when a new version is available?
Dear Duane,
Thank you so much. I'm going to try it tomorrow.
Best Regards,
Kevin
发自 WPS邮箱客戶端
在 "Duane Hookom duanehookom@... [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2019年2月7日 22:19写道:
This is the script file that is saved with a vbs extension. This is the only copy I could find and it is used for an Excel file. I don't have the time now to change the lines near the bottom to make it Access.
'===================' File: TrustCopyRun.vbs'===================Const SystemFolder= 1Dim fso 'to be used for file related codeDim SysFolderDim SysFolderPathdim strUserLoginDim RegEdPathDim strAppFolderDim strAppNameDim strAppFileDim strAppNetworkFile'==============================================================' edit the values in the next three lines to match your application and network locationstrAppName = "YourAppTitleHere"strAppFile = "YourAppFileNameHere"strAppNetworkFile = "YourFullAppNameHereWithNetworkPathIncluded"'==============================================================Set fso = wscript.CreateObject("Scripting.FileSystemObject")Set SysFolder =fso.GetSpecialFolder(SystemFolder)SysFolderPath= SysFolder.Path'initialize the script shell objectSet WshShell = WScript.CreateObject("WScript.Shell")strUserLogin = WshShell.ExpandEnvironmentStrings("%USERNAME%")strAppFolder = "C:\users\" & strUserLogin & "\" & strAppNameif not fso.FolderExists(strAppFolder) Thenfso.CreateFolder strAppFolderEnd If'Office 12RegEdPath = "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\"WshShell.RegWrite RegEdPath ,strAppName'Write the values into the registryWshShell.RegWrite RegEdPath & strAppName & "\Path" , "C:\Users\" & strUserLogin & "\" & strAppName & "\"WshShell.RegWrite RegEdPath & strAppName & "\AllowSubfolders" , 1, "REG_DWORD"'Office 14RegEdPath = "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Locations\"WshShell.RegWrite RegEdPath ,strAppName'Write the values into the registryWshShell.RegWrite RegEdPath & strAppName & "\Path" , "C:\Users\" & strUserLogin & "\" & strAppName & "\"WshShell.RegWrite RegEdPath & strAppName & "\AllowSubfolders" , 1, "REG_DWORD"'copy the application file from the network location to the local folderfso.CopyFile strAppNetworkFile ,strAppFolder & "\", 1'run the applicationSet xlApp = CreateObject("Excel.Application")set xlBook = xlApp.WorkBooks.Open(strAppFolder & "\" & strAppFile)'wshshell.Run strAppFolder & "\" & strAppFilewscript.QuitFrom: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Kevin qingqinga@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Wednesday, February 6, 2019 11:23 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] What is the best way to update front end automatically when a new version is available?
On 07-Feb-2019 12:11 PM, Duane Hookom duanehookom@... [MS_Access_Professionals] wrote:�Hi Kevin,If you search the web you will find several free utilities. I generally create a script or batch file that- creates a directory on the user�s hard drive- copies the front end to the directory- sets the directory to trusted- opens the fileDuaneGet Outlook for iOS�From: ms_access_professionals@yahoogroups.com on behalf of Kevin qingqinga@... [MS_Access_Professionals] <ms_access_professionals@yahoogroups.com>Dear All,
Sent: Wednesday, February 6, 2019 10:00 PM
To: ms_access_professionals@yahoogroups.com
Subject: [MS_AccessPros] What is the best way to update front end automatically when a new version is available?�
What is the best way to update front end automatically when a new
version is available? Thanks in advance.
Best Regards,
Kevin
------------------------------------
Posted by: Kevin <qingqinga@...>
------------------------------------
------------------------------------
Yahoo Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)
<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com
<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
__._,_.___
Posted by: wrmosca@comcast.net
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (9) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
SPONSORED LINKS
.
__,_._,___
Tidak ada komentar:
Posting Komentar