Thanks for the tip daluu. I'm just venturing into the c# world from the vba world and have zero 'court sense' as of yet. I'll give your suggestions a whirl.
Main Topics
Browse All TopicsHi Experts,
I'm attempting to create an ActionsPane in word that will allow users to add comments to a table at the bottom of the document, so that as they are reviewing the document, they can add an entry into the word table by entering the comments in the actionspane and hitting a button.
So how would I go about:
1. Seeing if a table already exists (lets call it CommentTable); if it does move on to step 2, if not, add the table with 3 columns of 1"; 1",4.5" widths.
2. Add a new line to the bottom of the table; there will be 3 fields called Section, Reviewer, Comment with data from the actionpane.
Thanks for the help!
Deedub84
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: daluuPosted on 2009-05-03 at 16:12:00ID: 24291625
Well, I don't have the time right now and I'm sure other experts might provide you with the needed code examples, but here's a tip on how to get the code yourself:
Use Word macro recorder along with editing or tweaking the VB macro code in Word to do what you want. A trial & error test. Basically the VB macros along with the Word COM API will provide you all the needed methods and properties to add a new line or row to the table or to insert a table with the specified properties. Then once you have the macro code working like the way you kind of want it, you can port the VB code over to C#. Because I'm assuming you are using the Word COM/DLL library, the API calls will be the same, only the syntax is slightly different. There should be Word API reference available in the macro editor, and if not, then online.
One note I'd like to mention though, using Word API in .NET/C#, your API support will be tied to the version of Word that is on your development environment that you will compile the code on. Therefore you might run into problems if your end user has a different version of Word installed. If you ever need broad Word version support, avoid using API calls that are specific to a Word version, or better yet, have the .NET/C# code call a VBScript that will interact with Word, where possible, since the VBScript COM interface is more version lenient than the .NET interface to Word is.