On 9 Apr, 09:53, Armin Zingler <az.nos...@freenet.de> wrote:
> Am 09.04.2010 10:47, schrieb Barry:
>
> > i get the following error
>
> > The specified range is not from the correct document or story.
>
> > Understand what the error is saying, but have not got a clue to how
> > to
> > get around it.
>
> I think you have a Word automation problem, not a VB.Net problem.
> The guys in the Word VBA group should know it.
>
> --
> Armin
It okay i have work it out
For Each BookMark As Word.Bookmark In WrdTemplate.Bookmarks
Dim NewRange As Word.Range
NewRange = WrdDoc.Range(BookMark.Range.Start,
BookMark.Range.End)
WrdDoc.Bookmarks.Add(BookMark.Name, NewRange)
Next
Thanks
|