Sorry, couldn't think of a more descriptive title.
I have a small program that reads in Word Documents. The program has been developed in Visual Studio 2005 in Windows Vista. The program also reads in Word Documents with Microsoft Office 2007.
Here is the issue. When I put the same project on a different machine, running Windows XP, Office 2003, and Visual Studio 2005, it crashes as soon as I try to open the Word document. I put the whole project on the machine and did a clean rebuild/compile. I also tried putting a working executable, and that crashes too.
However, when I do the same thing on a third machine with XP, and Office 2007, it works.
This leads me to believe that the code only works for Office 2007. It worked on both machines running Office 2007 (and different OS).
What could be the cause of this? Built in libraries or anything like that?
Thanks a lot.
Edit:
If it hleps any, here is the code where the file open function is implemented: - void CAudioPlayerMFCDlg::OnBnClickedPlayButton()
-
{
-
_Application wordApp;
-
CString id("Word.Application");
-
BOOL status = wordApp.CreateDispatch(id);
-
_Document myDoc;
-
COleVariant covTrue((short)TRUE);
-
COleVariant covFalse((short)FALSE);
-
COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
-
Documents docs = wordApp.GetDocuments();
-
CString ReportFileName("C:\\test.doc");
-
myDoc = docs.Open(COleVariant(ReportFileName),
-
covOptional,
-
covFalse, // ReadOnly
-
covOptional,
-
covOptional,
-
covOptional,
-
covOptional,
-
covOptional,
-
covOptional,
-
covOptional,
-
covOptional,
-
covOptional);
-
wordApp.SetVisible(TRUE); //when i step to here in debugger, it crashes
-
wordApp.Activate();
-
-
// It is very important to set the user control after we're done.
-
// If we don't do that, Word will assume that we are still in control
-
// and will not "quit" or close the document when the user quits.
-
myDoc.SetUserControl(TRUE);
-
}
4 1825
You have your answer: Office 2003 isn't the same as Office 2007. Office is backward compatible. That is, Office 2007 can use Office 2003 files but not vice versa.
Whether you use Vista or XP should not be an issue unless you are using some Vista-specific API's.
I'm still having problems and I really need some help.
This code worked for Vista with Office 2007 and XP with Office 2007. My machine is running XP with Office 2003. At first, I thought that Office was causing the program.
So I got a copy of Office 2007 and tried a clean build of the project. I also tried the executable. It still crashes at the same place.
I am all out of ideas for now. The program works, just not on my machine (now running XP and Office 2007) I have no idea what else I can do.
Thanks
So you have a machine with XP and Office 2007 that works.
Then you have your other machine that has XP and Office 2007 that crashes.
Do I have that right?
Question: Are both machines running XP with Service Pack 2??
So you have a machine with XP and Office 2007 that works.
Then you have your other machine that has XP and Office 2007 that crashes.
Do I have that right?
Question: Are both machines running XP with Service Pack 2??
Yes, you have that right. Both machines are running SP2.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Ryan Smith |
last post by:
Hello All,
I am new to the list and python community as well. I was wondering if anyone
knows of any good python books emphasizing Windows 2000? I am a network
engineer in an Active Directory environment and I have found serveral uses
for python, and I need to find a book that emphasizes features of python 2.2
and programming in this type of environment. I apologize for the rather
basic question, but I wasn't sure exactly were to ask....
|
by: Herr Lucifer |
last post by:
It is a long time now that I am using "Dependency Walker for Win32" and
navigating through different Dlls in "System32" folder to find my target API
functions. The thing I have noticed is that, 'almost' all system .dll and
..exe
files are written in C and not C++. If C++ is a powerful OO language and
it's much greater than C for large application development, then why haven't
Microsoft used it in its operating system? Is there a...
|
by: cat_dog_ass |
last post by:
I am used to programming in DOS mode via Borland C++. I would now like
to create programs for the Windows envirinment. Is it absoultely
necessary to use Visual C++ to do this? Are there other tools that can
help me in doing Windows programming via C++? How am I going to create
drop-down menus and allow my programs to interact with the mouse?
Regards,
Icon
|
by: Alf P. Steinbach |
last post by:
The eighth chapter (chapter 2.1) of my attempted Correct C++ tutorial is now
available, although for now only in Word format -- comments welcome!
Use the free & system-independent Open Office if you don't have Word.
Classes
<url: http://home.no.net/dubjai/win32cpptut/w32cpptut_02_01.zip>
Introduces the C++ language feature used to define new types, namely
classes. The focus in on creating safe and reusable classes. As a main
|
by: Chris Paul |
last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows.
I've set this up countless times on BSD (piece of cake) but I'm trying
to do this on Windows now so that my developer can work on her local
machine.
Everything looks pretty good. OpenLDAP/cygwin works great. PostgreSQL
works great. Apache runs. PHP runs.
But when I try to connect to my PostgreSQL server using PHPPgAdmin, I
| |
by: SEFL |
last post by:
Hi there,
I'm trying to write a VBS that accesses a local database on my system
(personal project).
I'm running Windows XP 64-bit with Access XP. Every time I try to
access the database on the machine, I get the following error:
"Provider is not specified and there is no designated default
provider."
|
by: noahmd |
last post by:
Okay, once-upon-a-time I tried to start programming by learning C. At
the time I was younger and didn't really understand all that C had to
offer. I eventually moved over to Microsoft's Visual Basic. It was
nice to be able to design a visual application with no effort (too bad
I didn't really learn the ins and outs of programming)
Long story short, I want to get back into programming, and Python looks
like a good choice for me to...
|
by: aarklon |
last post by:
Hi all,
I found an interesting article here:-
http://en.wikipedia.org/wiki/Criticism_of_the_C_programming_language
well what do you guys think of this article....???
Is it constructive criticism that needs to be appreciated always...???
|
by: =?Utf-8?B?UlJD?= |
last post by:
I have a Compaq nc 6120 that I am trying to upgrade too Windows XP. The
system has been checked for compatibility and it says that everything is
fine. When the program starts loading XP I get a blue screen that tells me if
it is the first time I have seen the screen reboot. In the Stop part I have
the two error messages.
0X0000007E (0XC0000005, 0XF85480BF, 0XF8994208,OXF8993F08
pci.sys-AddressF85480bf base @ f8541000, Date Stamp 3B7D855C
|
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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
| |