Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Bazaar » OleAut : Office Automation Encapsulation, then made easy
OleAut : Office Automation Encapsulation, then made easy [message #51270] Tue, 26 February 2019 17:06
omari is currently offline  omari
Messages: 188
Registered: March 2010
Experienced Member
Hi,

this package hide all low-level complexity, using U++ habits like operator overloading and type conversion operators.
it work directly with Upp types like String, int ... (no need for BSTR ,VARIANT,..)

I do not forget to thinks Koldo for the package OfficeAUtomation, as it is my start point

here an example:
Save WinWord document as unicode text:

bool SaveFileAsUnicodText(String filein, String fileout)
{
	OleObject App;
	OleObject doc = App("Documents.Open", filein, false, true, false);
	if(!doc) return false;
	doc.Set("TextEncoding", 65001); // vUtf = 65001
	bool r = doc("SaveAs", fileout, 7); // wdFormatUnicodeText = 7
	doc("Close");
	//App("Quit");
	return r;
}



OleAutTest package containe an Excel example and a Windows Script Shell one.

  • Attachment: OleAut.zip
    (Size: 8.71KB, Downloaded 8 times)


regards
omari.

[Updated on: Mon, 04 March 2019 14:50]

Report message to a moderator

Previous Topic: Functions4U_Demo: Inconsistent result of GetRelativePath
Next Topic: MessageCtrl: A passive notifications ctrl and manager.
Goto Forum:
  


Current Time: Mon May 27 05:44:18 CEST 2019

Total time taken to generate the page: 0.00661 seconds