Link to home
Start Free TrialLog in
Avatar of davinder101
davinder101

asked on

lotus note create attachment function not showing proper application icon

hi i am using lotus note c plus plus api to create an attachment to a document note

the file is attached but the attached file is not having proper icon.
all attached file like doc,txt,xls all are having same icon.

what modification i have to do in my code to get the proper application icon of an attachment.

LNNotesSession		Session;
	LNDatabase		Db;
	LNRichText		RT, NewRT;
	LNViewFolder 		Folder1, Folder2;
 
	DBHANDLE hdb = NULL;
	STATUS ret = Session.Init();
		
	Session.GetDatabase("C:\\MyRichText.nsf", &Db, "");
	Db.Open();
 
	Db.GetViewFolder("First", &Folder1);
	Db.CreateDocument(&NewDoc, MAIL_REPLY_FORM);
 
	NewDoc.Open( LNNOTEOPENFLAGS_DEFAULT );
	NewDoc.CreateItem("Body", &NewRT);
	NewRT.GetCursor(&rtCursor);
 
	NewRT.CreateAttachment("C:\\link1.txt",&rtCursor,"my text file",TRUE);
	NewRT.CreateAttachment("C:\\link1.doc",&rtCursor,"my doc file",TRUE);
	NewRT.CreateAttachment("C:\\link1.xls",&rtCursor,"my xls file",TRUE);
 
	NewDoc.Save();
	NewDoc.Close();
	Folder1.FolderAddDocument(NewDoc);
 
	Db.Close(); 
	Session.Term();

Open in new window

Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

http://www-12.lotus.com/ldd/doc/tools/cplus/3.0/lncpp30.nsf/078c27b23262ffff852566dd0029426a/72f8e51f328f823a85256e8200532dc4?OpenDocument

They suggest to somehow use the last parameter in the call, &attachment, but I assume that won't matter.

What version of the C++ API do you use, and what Notes release?
Avatar of davinder101
davinder101

ASKER



lotus notes 6

Release 6.0 September 26,2002

api

Lotus c++ api 3.0

ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial