i have no TWPRichText in this case .... I just generate a simple <b>Text</b> and would like to put htis into the clipboard ...
so taht the user can paste it into any TWPRichText ...
Beiträge von andi_st
-
-
Just found the problem
It was nothing with generating the Text, it was the viewer,
The viewer loaded the WPT Text, and than the GNU-Get Text unit tries to translate the text per RTTI and after that the text was wrong! -
-
I just tried to insert a TGraphic (TMetafile image) into my Editor, but didn't get it working
My first try was to find the Mailmergefields
CodemmList := TWPTextObjList.Create; RichText.FieldGetList(mmList, TRUE); for i:=0 to mmList.Count-1 do begin mmItem := mmList[i];CopyChartToFile('d:\test.png');// Here also tried per stream or as EMF .... wpObj := TWPOImage.Create(RichText.Memo.RTFData);(* Also tried wpobj := TWPOImage.Create(tempDokument.RichText); wpobj.Graphic := tempGraphics;//Image1.Picture.Graphic; wpobj.WidthTW := wpobj.ContentsWidth; wpobj.HeightTW:= wpobj.ContentsHeight;*) wpObj.LoadFromFile('d:\test.png'); mmItem.ObjType := wpobjImage; mmItem.objRef := wpObj;(* Also triedmmItem.LoadObjFromFile('d:\test.png');*) end; end; mmList.Free;
-> All theses treis didn't do anything ... nothing appears on the resulting document
And i treid it also in the mailmerge event
Here also tried as PNG or as EMF, per file and per TStreamCode
Alles anzeigenprocedure MailMergeGetText(Sender: TObject; const inspname: string; Contents: TWPMMInsertTextContents); wpObj := TWPOImage.CreateImage(Contents.DataCollection, tempGraphics); // wpobj.LoadFromFile() Contents.obj := wpobj; // and here also tried CopyChartToClipboard; WPRichText.PasteFromClipboard(); WPRichText.TextCursor.SelectToHere(Contents.StartInspObject);
After this the whole document is duplicated -> all text are twice and the image of the charts is twice, but the first appearance of the image only a playeholder is seen (no image only the border)What i am doing wrong?
-
Hello
I have to set the TopMargin of the First page different to the other pages, how can i do this?
I only know how i can set it for all pages...
CodetempRE.Header.RightMargin := _twRightMarginWidth; tempRE.Header.LeftMargin := _twLeftMarginWidth; tempRE.Header.TopMargin := _twTopMarginWidth; tempRE.Header.BottomMargin := _twBottomMarginWidth;
But how i set them individually?