Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
mnt mnt is offline
external usenet poster
 
Posts: 2
Default Converting Tables to Text macro

I have a macro I'm starting to have trouble with. I copy a one-column MS
Access query result. Then in Word, it pastes it in to a doc as RTF, goes to
the end of the doc, moves up one row and converts the table to text.

The macro is erroring out because the "object doesn't refer to a table." If
I go into the doc and see where the cursor is, it's at the bottom of the doc
and I cannot move it (via arrow keys) up one line to get the cursor into the
table - thus the error, I think.

Is there something I can do differently in the macro so I'm always located
in the table and the macro can run?
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Converting Tables to Text macro

If it is the only table in the document, use

ActiveDocument.Tables(1).ConvertToText

or if there is more than one and this is the last table, use:

With ActiveDocument
.Tables(.Tables.Count).ConvertToText
End With


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"mnt" wrote in message
...
I have a macro I'm starting to have trouble with. I copy a one-column MS
Access query result. Then in Word, it pastes it in to a doc as RTF, goes
to
the end of the doc, moves up one row and converts the table to text.

The macro is erroring out because the "object doesn't refer to a table."
If
I go into the doc and see where the cursor is, it's at the bottom of the
doc
and I cannot move it (via arrow keys) up one line to get the cursor into
the
table - thus the error, I think.

Is there something I can do differently in the macro so I'm always located
in the table and the macro can run?


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for converting Citations to Static text? grammatim[_2_] Microsoft Word Help 8 April 30th 09 07:18 AM
Formatting after converting tables to text Dina Tables 2 February 13th 09 03:48 AM
converting text to tables Word 2003 Roadbug Tables 1 November 15th 07 12:28 PM
Converting Multiple Tables to Text Hal Tables 4 March 14th 07 06:01 PM
Macro to Convert All Embedded Excel Tables to Text Jeff Rush via OfficeKB.com Tables 1 March 27th 05 05:05 PM


All times are GMT +1. The time now is 09:42 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"