+ Reply to Thread
Results 1 to 4 of 4

Using CreateObject("WScript.Shell") for non special folders

  1. #1
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Using CreateObject("WScript.Shell") for non special folders

    Hi,

    I am trying to create hyperlink to a open .pdf file. Every time a new pdf file will be opened based on the cell value. Following code is working only if my pdf files are on "Desktop" Folder. Can someone help me in getting the following code to work for files that are not on C:\ drive. pdf files are located in E:\Laxman\2016\.

    Please Login or Register  to view this content.
    Thanks
    Laxminarayana

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Using CreateObject("WScript.Shell") for non special folders

    Hi,

    I think you are making things too complicated. Try the following construction:
    Please Login or Register  to view this content.
    The 'ThisWorkbook' (or 'ActiveWorkbook') is probably not needed, but that's what I have in code that works.

    Lewis

  3. #3
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Using CreateObject("WScript.Shell") for non special folders

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: Using CreateObject("WScript.Shell") for non special folders

    Thank You! very much. That works. :-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Documentation Regarding CreateObject("Wscript.Shell")
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-13-2015, 05:26 AM
  2. [SOLVED] Best way to modify this line of Code using ("WScript.Shell").
    By vnzerem in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2014, 04:58 PM
  3. Replies: 2
    Last Post: 01-03-2013, 04:32 PM
  4. [SOLVED] CreateObject("WScript.Shell").Popup
    By MyComputerGuy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-14-2012, 09:18 AM
  5. Replies: 4
    Last Post: 05-07-2012, 07:13 PM
  6. CreateObject("Wscript.shell").exec
    By frogboy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2012, 09:39 AM
  7. using WScript.CreateObject("Wscript.Shell
    By John Keith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-30-2005, 02:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1