光纤熔接 ERP

弱电论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 583|回复: 0
打印 上一主题 下一主题

【Access小品】创建文件(夹)快捷方式

[复制链接]
跳转到指定楼层
1#
发表于 2012-3-27 16:19:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
华为代理商
  1. Function CrtShortcut(Myname As String)
  2. '引用:Windows Script Host Object Model
  3. '功能:在桌面创建快捷方式
  4. Dim strDesktop As String
  5. Dim objShellLink
  6. Dim strname As String
  7. Dim wsh As New WshShell
  8. strname = Mid(Myname, InStrRev(Myname, "\") + 1)
  9. strDesktop = wsh.SpecialFolders("Desktop")
  10. Set objShellLink = wsh.CreateShortcut(strDesktop & "\" & strname & ".lnk")
  11. objShellLink.TargetPath = Myname
  12. objShellLink.WorkingDirectory = strDesktop
  13. objShellLink.Save
  14. End Function
复制代码


附件下载:创建文件快捷方式.rar

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|广告咨询|VIP注册|关于我们|联系我们|积分规则|手机版|Archiver|弱电之家论坛 ( 京ICP备11008917号-3 )

GMT+8, 2025-6-8 07:52 , Processed in 0.041376 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表