Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Opening a Word and/or PDF document from Excel

I want to write a macro which on execution opens a file (Word document
/ PDF - in their respective applications) which is stored at a
specified path on my system. Can somebody provide me a vba code for
doing the same?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Opening a Word and/or PDF document from Excel

Vikesh, here is one way,

Sub OpenFiles()
Dim sPath As String
sPath = "C:\My Documents\"
With ThisWorkbook
.FollowHyperlink sPath & "test.pdf"
.FollowHyperlink sPath & "test.doc"
End With
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Vikesh Jain" wrote in message
ups.com...
I want to write a macro which on execution opens a file (Word document
/ PDF - in their respective applications) which is stored at a
specified path on my system. Can somebody provide me a vba code for
doing the same?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening word document through excel vba srinums Excel Discussion (Misc queries) 0 June 8th 06 12:02 PM
Opening a Word Document from Excel - ??Stumped?? wjoc1[_4_] Excel Programming 1 July 12th 05 05:26 PM
Opening Word Document with excel [email protected] Excel Discussion (Misc queries) 0 March 21st 05 01:49 AM
opening a word document from excel chris Excel Programming 5 April 1st 04 03:17 PM
Opening a Word Document in Excel Tonja Excel Programming 2 September 18th 03 02:56 AM


All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"