1
Answer

Insert Data in Word Bookmarks

Jason Anderson

Jason Anderson

13y
3.1k
1
Hello,

I am trying to find bookmarks I set in MS Word 2007 so that I can replace form field with text via C# (Visual Studio .NET 2003).  When I write the code, I don't see the methods that I have seen in many examples on the web.

objDocument.Bookmarks.get_Item(ref objBookmark).Range

The "get_Item" method is not available when I type objDocument.Bookmarks.

The same goes for "Item".

I have "using Word = Microsoft.Office.Interop.Word;" at the top of my code.

I try running the code and get this error message "The requested member of the collection does not exist."

Any ideas?

Thanks.

Jason
Answers (1)
0
sacresp

sacresp

NA 458 0 20y
In your C# project, add to a reference to the compiled vb.net assembly. Or, if you're using VS.NET, you can add reference to the other project (both must be loaded in the same solution)