473,434 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Office Automation using MFC

Hello All,

My aim is to have a MFC application which takes two word file names as
input. Then it opens these two word files in ms word apllication
windows for comparing side by side with eachother. This is also known
as Office Automation. I am trying to use the dynamic approach.
The Dynamic approach:
1) Get class id of the required class.
2) Using "CoCreateInstance" create an instance of this class. This
also returns a pointer to the Unknown Interface.
3) Using the "QuerryInterface" and pointer to Unknown Interface get
a pointer to the Dispatch Interface.
4) If any further interface is needed use "QuerryInterface" and the
pointer to Dispatch Interface get a pointer to the Required Interface.
5) Use the final Interface Pointer and "GetIDsOfNames", to get
DispatchId of the required function.
6) Use the DispatchId and final Interface Pointer to "Invoke" this
function.

The method I need to use is "CompareSideBySideWith". This method
can be accessed only by an object of "Windows" class or
"Word.Document" class. The class id of the class "Windows" is
not available hence I have to use the class "Word.Document". Using
the class "Word.Document", I am able to get till step 4, i.e. I am
able to get a pointer to it's Dispatch Interface. In step 5 it does
not return any Dispatch id for "CompareSideBySideWith" method. In
the msdn documentation it is mentioned that "CompareSideBySideWith"
is a method of that class. No documentation can be found to check if
there are any intermediate interface between the "Dispatch" and the
required method.

Can anyone please tell me where I am going wrong?

Thanks,
Viraj
Mobiliti Inc.
a.*****@mobiliti.com
http://www.mobiliti.com

Nov 13 '05 #1
1 1862
On 2 Jun 2005 06:48:33 -0700, vi************@gmail.com wrote:
Hello All,

My aim is to have a MFC application which takes two word file names as
input.

<snip>

Hi
Try another group. possibly microsoft.public.vc.mfcole, or
microsoft.public.word.oleinterop

David

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard | last post by:
Office Addins are easy in .NET. Try this from Visual Studio's main menu: File New Project "Other Projects" Extensibility Projects Shared Addin Run the wizard and you're off...
2
by: Alex Maghen | last post by:
Hi. I've seen several KBs on using .NET for MS Office Automation. But I have a particular question: I am developing a somewhat stand-alone .ASPX page which will need to do some relatively simple MS...
0
by: Karel | last post by:
Hi, I have developed a vb.net application to create a mail-merged document by using Automation to word from VB.NET. I added the following reference to the application: Microsoft Office 10.0...
2
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability,...
6
by: Luke Vogel | last post by:
Hi all ... could someone point me in the right direction for programming office applications (specifically excel) using vb.net? Can vb.net replace or enhance VBA that comes with the office suite?...
1
by: Alberto | last post by:
Hi all. I'd like to know if the "architect" version of Visual Studio .NET includes the environment to develop Office application. Any way is it possible to devolpo Office XP apps with VS .Net or I...
1
by: BK | last post by:
I have a .NET Solution (currently in 2003, FW 1.1) that uses Office automation for a few things (generates a Word document, dumps datagrids to Excel, etc.). One of my programmers works on the...
12
by: Tomas | last post by:
Hi, I have worked with VB.NET for half a year (semi-newbie). Currently I am looking around for some books for those that crossed the starting hurdle. There are too many books out there-make...
1
by: =?Utf-8?B?cm9i?= | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
1
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
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...
1
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...
0
agi2029
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,...
0
isladogs
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.