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++ » UppHub » [SEMI-SOLVED] OfficeAutomation : How to Set Hyperlink to a Excel cell?
Re: OfficeAutomation : How to Set Hyperlink to a Excel cell? [message #33030 is a reply to message #33023] Sat, 02 July 2011 12:32 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

I try to add Method HyperLink to OfficeAutomation. But it not work Sad

Where is my mistake?

bool MSSheet::Hyperlink(int col, int row, String hypertext, String hyperaddress) {
	if (!App)
		return false;	

	VariantOle x, y;
	x.Int4(col);
	y.Int4(row);
	
	if (!(Sheet = Ole::GetObject(App, "ActiveSheet")))
		return false;

	ObjectOle Hyperlinks = Ole::GetObject(Sheet, "Hyperlinks");
	ObjectOle Cell1 = Ole::GetObject(Sheet, "Cells", x, y);
	VariantOle vCell;
	vCell.ObjectOle(Cell1);
	ObjectOle Link = Ole::GetObject(Hyperlinks, "Add", vCell);
	String d;
	if (Link != NULL) d= "Not Null"; else d="Null";
	PromptOK("After assing & link is "+d);
	VariantOle vAddr,vText;
	vAddr.BString(hyperaddress);
	vText.BString(hypertext);
	Ole::SetValue(Link, "Address", vAddr) ;
	Ole::SetValue(Link, "TextToDisplay", vText) ;
	return true;
}


Please help!


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}

[Updated on: Sat, 02 July 2011 12:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: AESStream and Core/SSL libraries
Next Topic: MAPIEx compilation problem in Win7
Goto Forum:
  


Current Time: Tue Jun 03 03:17:10 CEST 2025

Total time taken to generate the page: 0.02800 seconds