Stefan,
You can not just set the Range property like this
// Trying to set the text like this fails.
Bookmarks[1].Range = "Text";
The reason for this is that in VB, you are actually setting the default
property on the Range object, which is Text (I believe). So, in your case,
you have to access the property manually, like this:
// You need to set the property explicitly.
Bookmarks[1].Range.Text = "Text";
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Stefan said:
Hi
How can I set the text for a bookmark in my worddocument?
If I use the Range object I always get an error.
tnx
stefan