Hi All,
i am using file variable and i try to write the string exceeds the size 1024 it show the
error like " The length of the text string exceeds the size of the string buffer." . How can i
get the string into file.
My Code is like :----
FTxt.CREATE('C:\mail.txt');
FTxt.OPEN('C:\mail.txt');
FTxt.WRITEMODE(TRUE);
FTxt.WRITE(autOLMItem."To");
FTxt.CLOSE;
Thanks & Regrads,
Naidu.
](*,)
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
i am using the following automations
Name DataType Subtype Length
autOLAppl Automation 'Microsoft Outlook 12.0 Object Library'.Application
autOLNamespace Automation 'Microsoft Outlook 12.0 Object Library'.NameSpace
autOLItems Automation 'Microsoft Outlook 12.0 Object Library'.Items
autOLMapiFolder Automation 'Microsoft Outlook 12.0 Object Library'.MAPIFolder
autOLMItem Automation 'Microsoft Outlook 12.0 Object Library'.MailItem
i wrote the code like this
Contact.RESET;
CLEAR(autOLAppl);
CREATE(autOLAppl);
autOLNamespace := autOLAppl.GetNamespace('MAPI');
autOLNamespace.Logon('','',TRUE,FALSE);
autOLMapiFolder := autOLNamespace.GetDefaultFolder(5);
autOLItems := autOLMapiFolder.Items;
i := 69;
intEndOfLoop := autOLItems.Count;
Total :=Contact.COUNT;
W.OPEN('Contact No..#1##################\\' + Text001);
WHILE i <= intEndOfLoop DO
BEGIN
X +=1;
W.UPDATE(1,Contact."No.");
W.UPDATE(2,X);
W.UPDATE(3,Total);
autOLMItem := autOLItems.Item(i);
Contact.RESET;
Rec."Synchronized Date" := autOLMItem.SentOn;
IF autOLMItem.Size > 9999 THEN BEGIN
MESSAGE('%1',autOLMItem.Size);
FTxt.CREATE('C:\mail.txt');
FTxt.OPEN('C:\mail.txt');
FTxt.WRITE(autOLMItem."To");
here i try to write the autOLMItem."To" into the file. But "To" string length is exceeds the 1024 so, it shows the error. Here how can i get char by char in to the character array.
For Example we are having the file or string then we will get the char by char but it is the
autOLMItem."To" ( automation dot property).
Thanks & Regrads,
Naidu. ](*,)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Have you cosidered using BigText data type
See JReynolds example in the post
viewtopic.php?f=23&t=29313
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html