Hi All,
I am trying to export data into word document using bookmarks.
Here is a bit of code.
UpdateWrdBookmark(‘Bill_to_Contact’,“Bill-to Contact”);
Function UpdateWrdBookmark
wdBooks := wdDoc.Bookmarks;
wdBook := wdBooks.Item(strBookmarkName);
wdRange := wdBook.Range;
wdRange.Text(strText);
It works like a charm.
Problem 1:
The only problem is that i need to export sales line description field in the bookmark & i dont know howmany there can be. Any idea about putting a break space in the line.??
Problem 2:
Even if i assume that there can be maximum 4 lines and add 4 bookmarks to it in the word document, bookmark sign appear in the word document even after it is generated. I have checked ‘Hidden Bookmark’ button in the word document…does not work!
Any help would be great
SL.SETRANGE(SL.“Document Type”,SH.“Document Type”);
SL.SETRANGE(SL.“Document No.”,SH.“No.”);
IF SL.FINDFIRST THEN
REPEAT
Desc += SL.Description + ‘’ + ’ ';
UNTIL SL.NEXT=0;