I need to read some word file from my c++ project through user interface.
I'm using dev C++ and FLTK GUI tool kit.
If any of you have an idea how to read/execute word file from c++ project, please let me know.
Or if you can recommend some tools/functions that can read the word file, it would also be helpful.
Thanks much in advance.
9 4340
Are you talking about a .doc file from Microsoft Word?
If so, check the Office SDK. There's a bunch of stuff there.
Yes. I mean .doc file.
But how to call/execute from C++ coding?
Can you expalin in more detail?
oler1s 671
Recognized Expert Contributor
Your terminology is a bit wonky, so I have to question if you even know what you want. (Executing is the not the same as reading, and word.exe is not the same as a word document file.) You can't execute something that isn't...an executable. Which a doc file isn't.
With that said, I'll rephrase your question as how can I have my program open and read a word doc file?
The answer is, reverse engineer Microsoft's proprietary file format and reimplement it. That's why Microsoft can charge whatever huge price they charge for Word. Doc files are a proprietary format, so the only one who can guarantee properly opening those files is Microsoft and their own software. A few others have made importers/exporters for Word documents. They had a lot of resources and money and manpower to deal with the issue.
So if you get my point, effectively you cannot.
True, but the Word SDK has a COM object that you can call from your C++ program - providing it's a Windows application.
Can you please write a short sample c++ code to call COM object?
Or where can i find the examples?
Thanks.
oler1s 671
Recognized Expert Contributor
Dear,
for run word.exe through visual C++ project type below code:
ShellExecute(Ge tSafeHwnd(),"op en","Word.exe", NULL,NULL,1);
Be careful this function run programm that installed and be in Widows folder. if you run program or *.exe file that is not installed or in other folder you must determine destination. for example: "D:\\My folder\\Desktop \\Myprogram.exe ", and last argument show window 1=normal and 3 = maximized.
best regards,
How about from borland c++?
Which command should i use for BC++?
I think there is no such command like shellexec in Visual c++.
Please advise me.
Thanks in advance.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Tim Williams |
last post by:
I'm trying to write a simple python program to access a MySQL
database. I'm having a problem with using MySQLdb to get the results
of a SQL command in a cursor. Sometimes the cursor.execute works,
sometimes not.
From mysql:
mysql> show databases;
+-----------+
| Database |
|
by: AP |
last post by:
Hi,
I'm trying to use c# to pop up a dialog box when a user attempts to close
word to prompt them if they want to exit or cancel (obviously other stuff
needs to happen based on their selection but that's the gist of it.)
I have everything set up, and it seems to work except that setting Cancel to
true and returning from my c# method appears to do nothing. Word still
closes. Am I doing something wrong?
private void...
|
by: Mystery Man |
last post by:
We are developing a C# application that has many interfaces to the
Microsoft suite (eg Word, Excel, Outlook, Powerpoint, etc). We need to
support Office 97, 2000, 2002 and any future versions.
Our first cut used early binding and worked fine with Office 2002. We
then ran on a machine that had Office 2000 installed and it all turned
to custard.
There appears to be a number of options to take to support multiple
versions:
|
by: Frank |
last post by:
Hello,
in a consoleapp I have a continious loop doing stuff.
Additionally I want during the loop type in characters and when the combined
chars form a word (ic 'test') I want to execute a method.
What could I use? Not Console.Read because it blocks the main loop. I would
need a asynchronous read of some kind. Anyone have a simple solution?
Thanks
Frank
|
by: Paul |
last post by:
Hi I am trying to build a tool that can read from a powerpoint file (slide text) and a microsoft project file (schedule information)and then write to a word file. Can something like this with vb.net also are there any examples that might show some of the methods and classes used
thanks Paul.
| |
by: winston.heng |
last post by:
Hi,
Thanks for reading this posting. I have been cracking my head on
solving the infinite loop
when i call the following section code. Any help or advise is greatly
appreciated =D
Thanks in advance.
Cheers!
|
by: sajithkahawatta |
last post by:
i wrote a code to read a doc in asp.net i woked properly in my iis ms
word is installed in this pc. but when i published in another sever in
which there is no ms word instslled it give error in it i used com
reference.
i want to know is there is a way to read a doc when ms word is not
instslled on the server
|
by: carmen413 via VBMonster.com |
last post by:
Dear All,
my text file like following,
a1, b1, c1, d1, e1
a2, b2, c2, d2, e2
a3, b3, c3, d3, e3
a4, b4, c4, d4, e4
.................
|
by: khalid Ahmed |
last post by:
I'm attempting to execute a SQL SELECT query but it doesn't seem to be returning any records. I've confirmed that the connection is actually opening and when I tried to execute the same query on mysqL server it returns results. but when I execute the query in my project without using OdbcParameter, it returns the result as expected.
Here is my code...
// connection string declaration
string connstr = @"Driver={MySQL...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |