M
mokshadavid
I have really researched this question, and I'm not finding the simple and
elegant solution that must be out there. Help! It's the missing piece of my
project. Please don't refer me to the MS KB, I've already looked and I can't
find what I need without giving myself a crash course in VBA code.
All I am looking for is a simple VBA code to open a specific word document.
Something like:
Sub OpenDOC1()
Documents.Open ("C:\DOC1.doc")
EndSub()
I know there is more to VBA code than that, but this is the bare bones idea
of what I need.
Instead of having Users memorize many document path names on a shared drive
to access them, I have created a Excel worksheet "Control Panel", where Users
can use drop-down boxes to select from multiple document choices. (I think
this format could work in both Excel and Word tables importing excel data, so
my question isn't Excel-specific)
A user will pull down a drop down box in Excel, choose between DOC-1, DOC-2,
DOC-3. When the User selects the document name, then VBA code will open that
document in word. I found VBA to perform that operation; the VBA code needs
to call in another VBA macro that opens that specific word document, which is
why I need the code for how to open a specific doc.
ELSE: am I making this too confusing for myself? Would a function work
better for that? I really want to stick to the drop-down box format, it is
the most user-friendly option in my case.
Thanks...
elegant solution that must be out there. Help! It's the missing piece of my
project. Please don't refer me to the MS KB, I've already looked and I can't
find what I need without giving myself a crash course in VBA code.
All I am looking for is a simple VBA code to open a specific word document.
Something like:
Sub OpenDOC1()
Documents.Open ("C:\DOC1.doc")
EndSub()
I know there is more to VBA code than that, but this is the bare bones idea
of what I need.
Instead of having Users memorize many document path names on a shared drive
to access them, I have created a Excel worksheet "Control Panel", where Users
can use drop-down boxes to select from multiple document choices. (I think
this format could work in both Excel and Word tables importing excel data, so
my question isn't Excel-specific)
A user will pull down a drop down box in Excel, choose between DOC-1, DOC-2,
DOC-3. When the User selects the document name, then VBA code will open that
document in word. I found VBA to perform that operation; the VBA code needs
to call in another VBA macro that opens that specific word document, which is
why I need the code for how to open a specific doc.
ELSE: am I making this too confusing for myself? Would a function work
better for that? I really want to stick to the drop-down box format, it is
the most user-friendly option in my case.
Thanks...