|
-
Jan 9th, 2007, 11:20 PM
#1
Thread Starter
Junior Member
How to save an existing file into a new file using "save as" method?
Hai to all,
if i'm having a file named as "tab.doc" which is a microsoft word document file ...
i want to save it as another file as "tab1.doc" by using
"save as" method....
Is there any "save as" method available for doing this process in VC++....
thanks in advance..
senthil..
-
Jan 10th, 2007, 03:55 AM
#2
Re: How to save an existing file into a new file using "save as" method?
You want a "save as" that presents the user with the "Save As" dialog? Or you want a "save as" as in "I want to save it as tab1.doc"?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 10th, 2007, 04:15 AM
#3
Thread Starter
Junior Member
Re: How to save an existing file into a new file using "save as" method?
Hai bee,
thanks for ur reply...
i want a "save as"... that saves the existing file tab.doc as a new file tab1.doc...
thanks..
senthil
-
Jan 10th, 2007, 04:41 AM
#4
Re: How to save an existing file into a new file using "save as" method?
You provided zero additional information. Your description of what you want to do still conflicts with the common association of "save as".
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 10th, 2007, 05:01 AM
#5
Thread Starter
Junior Member
Re: How to save an existing file into a new file using "save as" method?
we are having some functions or methods suchas
SaveFileTo(), SaveAs(),
By using these kind of methods...
Now i'm having a manually created word document file tab.doc...
when we open that file in ms word... it displays the content....
then i click the file->saveas button to save the same content of the tab.doc
into another file named as tab1.doc...
This is the process we are manually doing for saving the contents from an existing file into a new file...
Now i want to do that process automatically by using any SaveAs method..
Is there any SaveAs method available for doing this process?
thanks..
senthil
-
Jan 10th, 2007, 02:00 PM
#6
Frenzied Member
Re: How to save an existing file into a new file using "save as" method?
Code:
CopyFile(oldFileName, NewFileName, bFailIfExists)
would do the trick.
-
Jan 11th, 2007, 12:59 AM
#7
Thread Starter
Junior Member
Re: How to save an existing file into a new file using "save as" method?
Hai wey,
thanks for ur reply...
Itz working supervly...
But this CopyFile() method is not suitable for my project...
I want only "SaveAs" method for my project....
Can u please tell me
How to save an old file into a new fie by using "save as"...
The manual process is that...
if there is a file named 1.doc... we will open it with ms word...
then click file->save as.. button for saving the contents of 1.doc to a
new file named as 2.doc...
I want to automate this process in my program using any SaveAs() method
like CopyFile() method
is there any source code available for this process...
plzz help me...
thanks for ur reply..
senthil..
-
Jan 11th, 2007, 04:21 AM
#8
Re: How to save an existing file into a new file using "save as" method?
There's no difference between that and copying.
But if you really, really want to do it that way, you need to use Word's scripting interface. Look up OLE Automation. And don't use C++ for it.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 11th, 2007, 05:07 AM
#9
Thread Starter
Junior Member
Re: How to save an existing file into a new file using "save as" method?
Hai bee,
Thanks for ur suggestions and responses...
Then plzz tell me how to save the content of webpage into an image file...
in C++...
i found that saveToFile() is available for doing that...
i found a sample code in the net also...
Code:
void DownloadHtml(void)
{
CkHttp http;
// Unlock once at the beginning of your program.
http.UnlockComponent("Anything for 30-day trial");
CkString strHtml;
bool success = http.QuickGetStr("C:/1.html",strHtml);
// Save the HTML to a file.
strHtml.saveToFile("1.jpg");
}
But dont know how to use the above function in my project..
it showing errors like
'http': identifier not found, even with argument-dependent lookup
'CkString' : undeclared identifier
'CkHttp' : undeclared identifier
i'm a beginner to c++...
i think these are only small problems...
will u plzz help me...
thanks
senthil..
-
Jan 11th, 2007, 06:04 AM
#10
Re: How to save an existing file into a new file using "save as" method?
If you are a beginner to C++, those are HUGE problems. Well, actually it's exactly one problem: you don't know what you're doing.
Learn the language first. C++ isn't some scripting language you can just start doing things with. You have to actually learn it first.
C++ is also unsuited to all the things you've been trying to do so far. I recommend VB.Net instead.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 11th, 2007, 06:17 AM
#11
Thread Starter
Junior Member
Re: How to save an existing file into a new file using "save as" method?
But i'm now started working in the c++...
thats y i'm asking u...
i'm also learning C++ hardly for working...
plzz help me for those errors....
thanks...
senthil
-
Jan 11th, 2007, 06:20 AM
#12
Thread Starter
Junior Member
Re: How to save an existing file into a new file using "save as" method?
i think ckhttp is a base class...
and creating an object http for that base class...
by using that object we are accessing the saveToFile() method...
But i dont know where the ckhttp base class...
in the net they use ckhttp for class creating http object...
Will u plzz tell me how to use this?
-
Jan 11th, 2007, 06:21 AM
#13
Re: How to save an existing file into a new file using "save as" method?
It's a class, not a base class. They got it from some library that's probably linked in the article.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 11th, 2007, 06:23 AM
#14
Thread Starter
Junior Member
Re: How to save an existing file into a new file using "save as" method?
ok how can i get that ckhttp class....
is there any *.lib files available for using this class?
-
Jan 11th, 2007, 06:40 AM
#15
Re: How to save an existing file into a new file using "save as" method?
Why do you ask us? Look in that article.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 11th, 2007, 09:07 AM
#16
Frenzied Member
Re: How to save an existing file into a new file using "save as" method?
I really don't understand why you are adamant about using this 3rd party library.
I don't think there would be anything you couldn't do yourself or for free with open source code that can be done with that library.
If you insist on using that code, pay for the library and I'm sure the vendor will give you support.
Like CornedBee said, if you don't try to learn the language first, then you won't get much help here.
-
Jan 11th, 2007, 11:04 PM
#17
Thread Starter
Junior Member
Re: How to save an existing file into a new file using "save as" method?
ya ok thanks for ur suggestions...
i'm also now learning C++ hardly to work in this field....
thats y i joined this forum for clearing my doubts...
ok u responsed well for my doubts...
i will contact u in the future after learning C++ thouroghly..
thanks
bye..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|