Word 2003 VBA error

J

Jay Bukstein

I receive the following error message 'Run-time error 4605; This command is
not available.

I built this template 3 months back and works just fine then, now that the
user has request a new table column added, I add the new column to an exists
table and saved the *.dot.

I run it and get this error. I'm guessing some MS patch that was applied
made this not function anymore. If I open and save the template in office
2007 as a template with embedded macros, it works again. My plans are not to
deploy the new office until later this year, so any ideas for my fix.

Thanks,
Jay Bukstein
 
J

Jay Bukstein

Additional Piece,

The line of code that is erroring is 'Set tbl2 =
ActiveDocument.Tables.Add(tbl.Cell(rowCounter, 1).Range, 1, 5)

The preceeding line is set tbl =
ActiveDocument.Tables.Add(ActiveDocument.Bookmarks("wdStart").Range, 2, 1)
 
E

Ed

Hi Jay,

Those lines of code seemed to work for me (using Word 2003).

When I have seen 4605 errors in the past they usually had a bit more
information after the "This command is not available" part and it was usually
that extra information that gave a clue as to what the problem was. (E.g.
"This command is not available because the object refers to a protected area
of the document" or whatever.)

If that is the case with your problem, can you post the remainder of the
message and maybe also more of the code and then someone might be able to
advise as to what's going on?

Cheers.

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top