?
Solved

wordbasic how to open a  file

Posted on 2003-02-28
4
Medium Priority
?
384 Views
Last Modified: 2006-11-17
i need a macro to open an ms word doc
i have the nam in anaother doc file
how can i write a macro that opens a path written in a doc file?
pls help me with the command that copies the path into a variable

thanx very much
0
Comment
Question by:ak0s
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 16

Accepted Solution

by:
twalgrave earned 800 total points
ID: 8096770
You will simply need to open the document that has the other document name in it, read the text from that document and open it.  Such as:

    Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
    Selection.Copy

    Documents.Open FileName:="C:\delme.doc", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto
0
 

Expert Comment

by:CleanupPing
ID: 9474597
ak0s:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
This video teaches viewers about errors in exception handling.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question