PDA, Web, Desktop, GIS, Field Mapping, KML, UTM, Education, Cartoon

Mobile GIS Delphi Sql Server OpenSocial ASP.Net/C# Google KML RSS
Showing posts with label hollow box. Show all posts
Showing posts with label hollow box. Show all posts

Feb 24, 2008

hollow box(small box) issue in word app with Delphi

Instead of Chr(13) & Chr(10), use Chr(11) or the constant wdVerticalTab:


activedocument.FormFields(1).Result = "a" & chr(11) & "b"
Hope this helps,




while (pos(#13#10, value) > 0) do
begin
value :=ReplaceString(value,#13#10, #11);
end;
WrdDoc.FormFields.Item(FieldName).Result := value;





function ReplaceString(Dest, SubStr, Str: string): string;
var
Position: Integer;
begin
Position:=Pos(SubStr, Dest);
Delete(Dest, Position, Length(SubStr));
Insert(Str, Dest, Position);
Result:=Dest;
end;