You can't add a group as an anchored object as you would with, say, a rectangle—with insertionPoint.rectangles.add(); there is no insertionPoint.groups.add(). If you're working with InDesign desktop, you can select the group, cut or copy it, select the insertionPoint, and paste. Then do group.anchoredObjectSettings.properties = {anchoredPosition: AnchorPosition.ANCHORED, pinPosition: false}, then group.move() to your absolute coordinates.

If you're working with InDesign Server and don't have select, copy or paste, you'll have to do some acrobatics with snippets or libraries to get your group anchored. It's been covered here somewhere before...

You need to get a reference to your group -- let's call it myGroup -- and another to the insertionPoint where you want it anchored -- let's call it myIP. Given those, you can achieve your objective (in CS5 or later) by:

myGroup.anchoredObjectSettings.insertAnchoredObject(myIP);

You can specify a second parameter if you wish that specifies the anchor position:

Please check again. You are using that method available CS5.5 onwards, the older InDesign version doesn't have that method. check again what version of InDesign references are you added in Vb.net project. ?

@EyenanC – I just tested with InDesign CS5.5 7.5.3. The script is running without error.

I used the code of கற்பனை (Imagine), What you need is a text frame and a group on page 1 of your document. Select the text frame and run the script: the group will be anchored to the first insertion point of your selected text frame.

@Dave Saunders – thank you so much for pointing us to that capability of InDesign CS5.5 scripting DOM!