Free Support Forum - aspose.com

MoveToBookmark void?

Hi,

First grats for your .Net Word Component. It can be very helpful to Web developers who have so much trouble making MS Word running on a server Tongue Tied. I was looking for such a component since a while and i think it has a lot of advantages over Automation Smile. I’m actually making some tests with the Aspose.Word Component.

I tried merging bookmark and merging functionnalities because these are the most relevant features in Word document.

Merging went smoothly but i got a problem using bookmarks. I have to find a bookmark and insert text in it only if i find it. Problem is that MoveToBookmark is void type so i don’t know if the bookmark exists. Maybe there is another method i didn’t find Indifferent, but I must say i was awaiting a boolean return type from this method MoveToBookmark().

Any help is welcome !

Thank you

Faessler Gilles

faesgill wrote:
Merging went smoothly but i got a problem using bookmarks. I have to find a bookmark and insert text in it only if i find it. Problem is that MoveToBookmark is void type so i don't know if the bookmark exists. Maybe there is another method i didn't find Indifferent, but I must say i was awaiting a boolean return type from this method MoveToBookmark().


I'm just evaluating Aspose.Word, but look at the Document.Range.Bookmarks collection. It will return null (Nothing in Visual Basic) if the bookmark doesn't exist.

Thank you for your answer. Document.Range.Bookmarks is doing the job Smile.

Regards

Gilles