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 :-)

Plz check out the following attached file.

Hi Shaik,
Thanks for your help.

Regards,
Kalpana

Plz mark the thread as solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.