Word integration text box

Hello, I made an integration between Navision and Word (with mergefields). What I want to do is create a text box in Word and in this text box is a table. (so a merge field with is build up as table with code). I thought this would be very usefull for positioning the table. Now when the word document opens, the table (textbox) is not on the right place. I think i’ve tried almost every option in word, but no result Can anybody help me with this ? Thx Steve

Hi Steve

quote:


Originally posted by DesmedtS
… I think i’ve tried almost every option in word, but no result …


Which options did you try? My first idea is something like this (without testing): ... YourShape.Add; ... YourShape.Left(500); YourShape.Top(500); ... bye André

Hi AddShape(Type, Left, Top, Width, Height, Anchor) Does this not work? André

Hey again. First I do the following to get mij merge fields in word. cunWordMgmt.FieldAdd(wrdMergeFile,‘MARK’); Further On, i Do : IF recFiles.“Quote No.” <> ‘’ THEN InsertWordTable(‘MARK’,FileName,0) ELSE InsertWordTable(‘MARK’,FileName,1); Then : CLEAR(wrdDoc2); CREATE(wrdApp2); wrdDoc2 := wrdApp2.Documents.Open(txtFileName); wrdRange := wrdDoc2.Content; wrdRange.Find.Execute(txtText); wrdTable := wrdDoc2.Tables.Add(wrdRange,recPermisMN.COUNT + 1,5); // wrdCell := wrdTable.Cell(1,1); … (to build my table) And in word I made a text box where i defined a merge field in it. [:(!]

Hi Hmm. It seems I can’t help you with that. Sorry.

quote:


Originally posted by DesmedtS
… IF recFiles.“Quote No.” <> ‘’ THEN InsertWordTable(‘MARK’,FileName,0) ELSE InsertWordTable(‘MARK’,FileName,1); …


One point: Is the pointer in word in this moment on ‘MARK’? If not you may use GoTo. bye André