Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open a document where path is variable in C++

Status
Not open for further replies.

Assie

Programmer
May 13, 2003
3
0
0
NL
Can you please tell me how I can open a document, i.e. thats locate in a DOC folder somewhere on a server?
Where the path to that DOC Folder is customized by the user?

So i want to open the example.doc from the doc folder that with one user could be at: M:\Documents\DOC\example.doc and with the other user can be at
X:\My settings\DOC\example.doc
 
Not entirely sure what you mean - I take it that the doc format is of your own software, and you are not talking about launching word or something.

Is the user entering the path to the file - or do you simply want to find a file matching that filename given a root path?

Let me know - and I will try to help out.
M.

Hollingside Technologies, Making Technology work for you.
 
Maybe its more clear this way:
I am writing a program that can open a help.pdf from the DOC folder.
But the DOC folder can be anywhere on the users computer.
How can I find out what the path is . And how can I open the Help.pdf if I know what the path is?

 
Ok - that makes more sense.
Now - this DOC folder - is this the MyDocuments folder - or another one?

Is the location of this DOC folder stored anywhere in the registry or an ini file?

If not - can I suggest that when the DOC folder is created or moved, then an extra step is put in to store the path somewhere.

TO get around that - you could also store the location of the folder yourself in the registry - and perhaps if the location hasn't been setup when your program is run - then it asks the user for the location of the folder - which it can then store.

To launch the help.pdf file - assuming that acrobat reader is installed - you should just be able to create a process using the "help.pdf" as the app name.

Is this any help - get back to me and I will help further.

M.

Hollingside Technologies, Making Technology work for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top