|
I've been living with office automation via COM with a lot of help from MFC. If the OP had asked how to extract text content fro a .doc file, then I might have guided the OP to use COM. But then, somehow I don't like VBS and JS.
CPallini wrote: script components http://msdn2.microsoft.com/en-us/library/x5t0zfyf(VS.80).aspx[^] are, IMHO, amazing).
That isn't any script component. You seem to have mistakenly pasted a different link.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: 've been living with office automation via COM with a lot of help from MFC. If the OP had asked how to extract text content fro a .doc file, then I might have guided the OP to use COM.
David Crow has already done it.
Rajesh R Subramanian wrote: But then, somehow I don't like VBS and JS.
Well, I underatand the feeling, for instance I dislike MFC in favour of the honest WIN32 API .
Rajesh R Subramanian wrote: CPallini wrote:
script components http://msdn2.microsoft.com/en-us/library/x5t0zfyf(VS.80).aspx[^] are, IMHO, amazing).
That isn't any script component. You seem to have mistakenly pasted a different link.
You're right, my bad . I fixed it (BTW I hope I didn't made a link swap... What help may have from Script Components the OP taht asked how to read a single line from a text filke? ).
Regards
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Can you use Word Automation like:
COleVariant vtOptional((long) DISP_E_PARAMNOTFOUND, VT_ERROR),
vtDoc((short) 0);
if (app.CreateDispatch("Word.Application") == TRUE)
{
docs = app.GetDocuments();
CString strFileName = "myfile.txt";
doc = docs.Open(COleVariant(strFileName),
vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional);
strFileName.Replace(".txt", ".doc");
doc.SaveAs(COleVariant(strFileName), vtDoc,
vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional, vtOptional);
}
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i have given u the path C:\windows\mirosoft\App.exe ,to check wether this registered or not.
|
|
|
|
|
What kind of component, a COM one?
If you try to obtain an instance of the component then you also test if it is correctly registered.
[added]
BTW
bhogavalli suresh wrote: How to find wether a component is registered in regedit or not
The repository of COM component registration information is called registry . The regedit is just a tool to access manually the registry content.
[/added]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
modified on Wednesday, January 09, 2008 6:02:23 AM
|
|
|
|
|
bhogavalli suresh wrote: i have given u the path C:\windows\mirosoft\App.exe ,to check wether this registered or not.
Ok, thanks. I checked but could not discern whether it was registered or not. Could you please turn the lights up just a bit so I can see better?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Please tell me how can i get the files listed in windows MRU using VC++.
Thanks in advance,
Regards,
John.
Reply With Quote
|
|
|
|
|
See here[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
...formerly known as brahmma
Codeproject.com: Visual C++ MVP
|
|
|
|
|
How can i enable and disable ethernet connection in windows using c++
|
|
|
|
|
My WinXP is having problem to paste code snippets onto CP. Would it be ok that I tell you the names of the APIs, and you read the MSDN for the information about the parameter usage?
Steps:
1. SetupDiGetClassDevEx to get a handle to Device Manager.
2. In a loop, use SetupDiEnumDeviceInfo and SetupDiGetDeviceRegistryProperty to find the ethernet adaptor.
3. If found, use SetupDiSetClassInstallParams and SetupDiCallClassInstaller to disable / enable the ethernet adaptor.
4. SetupDiDestroyDeviceInfoList to free the handle.
Maxwell Chen
|
|
|
|
|
I am able to disable/enable the ethernet connection using Above Device management functions.
1. I am not able to get the current status of connection.
2. when i try to enable/disable using My Network place/Local Area Connection after i enable/disable ethernet connection from my application it gives error as "Connection failed".
|
|
|
|
|
Your reply contains answer to my questions.
But i noticed one problem that when i disable network connection using my tool written using above APIs, and try to enable network connection thorough My Network place->Local Area Connection, it gives Connection failed error.
Also I am not able to get the current status of network connection.
|
|
|
|
|
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
is there any sample how to open a usb connection and read data,
for example from a USB stick or mobile phone?
Tanks for any help!
Termal
|
|
|
|
|
You don't open a USB connection. What you do instead is open a handle to the driver of the USB device (using CreateFile) and using WriteFile and ReadFile to write and read data.
The name you need to supply to CreateFile depends of the driver itself. But in the case of a USB stick, you don't do it this way, you just open a file on the USB stick by providing the full path to it.
|
|
|
|
|
hi
i want to dynamically change the no of buttons tobe displayed in mfc dilog box
for that i hav created initially 10 buttons.but at runtime depending on condition i want to display and activate only some of the buttons.
Girish
|
|
|
|
|
use CWnd::ShowWindow()
modified on Wednesday, January 09, 2008 7:20:22 AM
|
|
|
|
|
toxcct wrote: CWnd::ShowWindow(BOOL)
A small correction, shouldn't mentioning BOOl leads confusion ? as ShowWindow take more than just TRUE or FALSE .
|
|
|
|
|
Good point indeed.
I always forget too it takes the (int) SW_ values.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Hi everyone,
I developed two dialog based applications.
i want to develop them as two dll's,
then i will call them in another dialog application to execute.
so help me out.
thanx in advance
Reagards
Shiva
|
|
|
|
|
|
Bad design, I suppose.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Hi..
I cannot update the xml file attributes using win32 console application.Plz help mme
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
And what was the error?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
I dont have the code to update xml file attributes using win32 console application.plz help me..
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|