[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

wordbasic how to open a  file

Posted on 2003-02-28
4
Medium Priority
?
395 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
2 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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

590 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