• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Opening Word doc through a VBA

helloakshay

New Member
Hello All

I am creating a excel document with Command button to open a particular document from a particular link.
The link has some 20-30 documents on the page.

Any help ideas how to solve the issue

I was able to open the link by doing the below code if the file is on the desktop or paths existing on the system

Code:
'Example:
ThisWorkbook.FollowHyperlink "https://abc.com"

Set wordapp = CreateObject("word.Application")

wordapp.documents.Open "C:\Users\Desktop\Names.docx" ' This work as long as the file is on the desktop path

wordapp.Visible = True

' once user clicks on abc button website opens but i am unable to make the specifc word document open
 
Try this

Code:
Sub automateword()


    Set wordapp = CreateObject("word.Application")


    wordapp.documents.Open "C:\Documents and Settings\anitao\My Documents\alo2004.doc"


    wordapp.Visible = True


End Sub
 
Hi !
open a particular document from a particular link.
Open directly particular document upon its particular link.

If it fails, that will need a particular crystal clear explanation !

And maybe on a particular Word forum as here it's an Excel forum …
 
The word documents are saved on a particular weblink (ex:http//abc.com/...)
once i click the link there are 20 different word documents.

My command button on the excel sheet will have the name of a word document. so once the user clicks that particular document should open.

In case further info let me know
 

First, manually on Word side, try directly to open a link
from one of the twenty documents :
if if works, you already know how to open it via a VBA code;
if it fails, can't do anythink without at least a technical presentation …
 
Just to refine my question further. for example on a yahoo / google website there are different documents saved in a word format out of which i want to open "travel details" document only.

I have a commond button on my excel sheet called "travel"

so what i wanted is once i click the button i want the travel detail document to be opened

Let me know if this can happen in anyway opening a word document
 
Back
Top