954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

opening a excel from word macro by getting the file name from word at runtime

Hi,

How to open a excel file from word macro by getting the file name from word.
this is my code

OrgFileName = Selection.Text + ".xls"
'OpenExcel Macro
Shell ("C:\Program Files\Microsoft Office\OFFICE11\excel ""C:\My Documents\File - CopyBook\""" + OrgFileName)

OrgFileName is the workbook name which i have to get from word document

Thanks
Kalpana :-)

Kalsrini
Newbie Poster
2 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

Plz check out the following attached file.

Attachments OpenExcelFile.doc (34KB)
aktharshaik
Posting Whiz
316 posts since Aug 2008
Reputation Points: 26
Solved Threads: 40
 

Hi Shaik,
Thanks for your help.

Regards,
Kalpana

Kalsrini
Newbie Poster
2 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

Plz mark the thread as solved.

aktharshaik
Posting Whiz
316 posts since Aug 2008
Reputation Points: 26
Solved Threads: 40
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You