Click here to Skip to main content
15,895,084 members
Articles / Desktop Programming / MFC

MS Office OLE Automation Using C++

Rate me:
Please Sign up or sign in to vote.
4.82/5 (60 votes)
5 Apr 2009CPOL9 min read 295.4K   18.1K   135  
A simple guide to automate MS Word and MS Excel using C++.
#pragma once


// CXLRange dialog

class CXLRange : public CDialog
{
	DECLARE_DYNAMIC(CXLRange)

public:
	CXLRange(CWnd* pParent = NULL);   // standard constructor
	virtual ~CXLRange();

// Dialog Data
	enum { IDD = IDD_XLRANGE };
	
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	TCHAR m_szValue[255];
	TCHAR m_szTitle[255];
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();
	CString GetValue();
	void SetTitle(LPCTSTR szTitle);
	void SetValue(LPCTSTR szValue);
	virtual BOOL OnInitDialog();
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
Naren started coding during 1999 with FORTRAN, then COBOL, PASCAL, C, C++, VC++ ..... C#, Java, ASP so on, till today. He claims himself as techie who loves coding, but he is not even sure which technology or platform he loves, most of the time Windows, some time WinCE, some time Linux, nowadays Android and embedded platforms. He can do some query stuffs with Oracle, SQL Server, MySQL. He strongly believes that C/C++ is a must for all programmers, "if you know C/C++, you can do programming on any language". He is an electronic gadget guy who likes to buy small gadgets all the time, at least he will do window shopping on a gadget shop. His interest always have been with Automation in any form, call it a little automated program sitting in his Laptop or a home automation program runs on his mobile. Apart from coding, he likes to do...???

Comments and Discussions