unknown table type object

M

mikenam

[image:
http://img.photobucket.com/albums/v713/johnnojogo/unknowntable.jpg]

word documents that I work with has tables like the picture above.
Below every table is a table like object also show in the picture above.
I'm trying to write a macro to automatically delete this Table like
object because the object seems to mess up formatting when it is
present. When i enable the "reveal formatting" option in Word 2003 it
shows table properties. Anybody know what this thing is and how to
delete it? When i write the following code below it does not become
selected. So vba does not see it as a table.

dim oTb as table

for every otb in activedocument.table
oTb.select

next



any ideas?

Thanks,
 
M

macropod

Hi mikenam,

Is there anything in the object? It looks like it could be a textbox or a frame.

To identify the object, try selecting it then running the following macro:
Sub TestObj()
If Selection.ShapeRange.Count > 0 Then
MsgBox Selection.ShapeRange(1).Name
End If
End Sub
 
M

mikenam

thanks for the reply macropod but shaperange does not identify the
object. it does not initiate the IF statement when the object is
selected. It does not identify a table either. When i add a textbox it
works.
 
C

Cindy M.

Hi Mikenam,
[image:
http://img.photobucket.com/albums/v713/johnnojogo/unknowntable.jpg]

word documents that I work with has tables like the picture above.
Below every table is a table like object also show in the picture above.
I'm trying to write a macro to automatically delete this Table like
object because the object seems to mess up formatting when it is
present. When i enable the "reveal formatting" option in Word 2003 it
shows table properties. Anybody know what this thing is and how to
delete it? When i write the following code below it does not become
selected. So vba does not see it as a table.

Is this Word 2003 or 2007? Which file format is the document (what's the
file extension)? Has it been imported/converted from another application?

Which View are you in when you see things like in the picture in your
link?

Are you able to click into this thing? Are you able to click on the edges
of it?

At the very least, I expect looking at the XML of the file would tell us
what Word thinks it is. Have you tried saving this in the Word 2003 XML
file format, then opening that as a text file?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
M

mikenam

Thanks for the reply Cindy


Is this Word 2003 or 2007? Which file format is the document (what'
the
file extension)? Has it been imported/converted from anothe
application?
It happens with both 2003 and 2007. File is exported from Oracle

Which View are you in when you see things like in the picture in your
link? I see the object in all 3 views (Normal, Web, Print). I do no
see the object when i print preview.

Are you able to click into this thing? Are you able to click on th
edges
of it? I can click in it and type in it but i cannont drag the edge
nor move it around like a normal table.

At the very least, I expect looking at the XML of the file would tel
us
what Word thinks it is. Have you tried saving this in the Word 200
XML
file format, then opening that as a text file?

im not familiar with xml but when i save the .rtf to .xml and open i
with notepad I get this. I cut the section from the last value in th
table to the next paragraph. Between it should be the uknown table typ
object.

</w:t></w:r></w:p></w:tc></w:tr></w:tbl><w:p wsp:rsidR="001D03F1
wsp:rsidRDefault="001D03F1" wsp:rsidP="006B5331"><w:pPr><w:pStyl
w:val="Normal-0"/><w:jc w:val="center"/><w:rPr><w:s
w:val="18"/><w:sz-cs w:val="18"/></w:rPr></w:pPr></w:p><w:
wsp:rsidR="00DD6B30" wsp:rsidRDefault="00DD6B30
wsp:rsidP="006B5331"><w:pPr><w:pStyle w:val="Normal-0"/><w:j
w:val="center"/><w:rPr><w:sz w:val="18"/><w:sz-c
w:val="18"/></w:rPr></w:pPr></w:p><w:tbl><w:tblPr><w:tblW w:w="8487
w:type="dxa"/><w:jc w:val="center"/><w:tblLayou
w:type="Fixed"/></w:tblPr><w:tblGrid/><w:tr><w:trPr><w:gridAfte
w:val="-1"/><w:jc w:val="center"/></w:trPr><w:tc><w:tcPr><w:tc
w:w="2367" w:type="dxa"/><w:gridSpan w:val="0"/><w:vAlig
w:val="center"/></w:tcPr><w:p wsp:rsidR="00444FEC
wsp:rsidRDefault="00444FEC" wsp:rsidP="00BC30B5"><w:pPr><w:pStyl
w:val="Normal-0"/><w:jc w:val="right"/><w:rPr><w:sz w:val="18"/><w:sz-c
w:val="18"/></w:rPr></w:pPr><w:r><w:t>
</w:t></w:r></w:p></w:tc></w:tr></w:tbl><w:p wsp:rsidR="00444FEC
wsp:rsidRDefault="00444FEC" wsp:rsidP="006F5377"><w:pPr><w:pStyl
w:val="Normal-0"/><w:jc w:val="center"/><w:rPr><w:rFonts w:ascii="Arial
w:h-ansi="Arial" w:cs="Arial"/><wx:fon
wx:val="Arial"/><w:b/><w:b-cs/><w:sz w:val="20"/><w:sz-c
w:val="20"/></w:rPr></w:pPr></w:p><w:p wsp:rsidR="00444FEC
wsp:rsidRDefault="00444FEC" wsp:rsidP="006F5377"><w:pPr><w:pStyl
w:val="Normal-0"/><w:jc w:val="center"/><w:rPr><w:rFonts w:ascii="Arial
w:h-ansi="Arial" w:cs="Arial"/><wx:fon
wx:val="Arial"/><w:b/><w:b-cs/><w:sz w:val="20"/><w:sz-c
w:val="20"/></w:rPr></w:pPr></w:p><w:p wsp:rsidR="00444FEC
wsp:rsidRDefault="00444FEC" wsp:rsidP="006F5377"><w:pPr><w:pStyl
w:val="Normal-0"/><w:jc w:val="center"/><w:rPr><w:rFonts w:ascii="Arial
w:h-ansi="Arial" w:cs="Arial"/><wx:fon
wx:val="Arial"/><w:b/><w:b-cs/><w:sz w:val="20"/><w:sz-c
w:val="20"/></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:ascii="Arial
w:h-ansi="Arial" w:cs="Arial"/><wx:fon
wx:val="Arial"/><w:b/><w:b-cs/><w:sz w:val="20"/><w:sz-c
w:val="20"/></w:rPr><w:t>
Hi Mikenam,
[image:
http://img.photobucket.com/albums/v713/johnnojogo/unknowntable.jpg]

word documents that I work with has tables like the picture above.
Below every table is a table like object also show in the pictur above.
I'm trying to write a macro to automatically delete this Table like
object because the object seems to mess up formatting when it is
present. When i enable the "reveal formatting" option in Word 200 it
shows table properties. Anybody know what this thing is and how to
delete it? When i write the following code below it does not become
selected. So vba does not see it as a table.

Is this Word 2003 or 2007? Which file format is the document (what'
the
file extension)? Has it been imported/converted from anothe
application?

Which View are you in when you see things like in the picture in your
link?

Are you able to click into this thing? Are you able to click on th
edges
of it?

At the very least, I expect looking at the XML of the file would tell
us
what Word thinks it is. Have you tried saving this in the Word 2003
XML
file format, then opening that as a text file?

Cindy Meister
INTER-Solutions, Switzerland
'Meister Word FAQ Welcome'
(http://homepage.swissonline.ch/cindymeister) (last update Jun 17 2005)
'Home' (http://www.word.mvps.org)

This reply is posted in the Newsgroup; please post any follow question
or
reply in the newsgroup and not by e-mail :)
 
C

Cindy M.

Hi Mikenam,
when i save the .rtf to .xml and open it
with notepad I get this

Yes, it apparently is a table. This is the key:

<w:tbl>

If you can locate the closing node (that follows, not the one
preceding which belongs to the "real" table) - </w:tbl> - then
delete from <w:tbl> through </w:tbl>, save, close and open in
Word.

1. Can you open it?

2. Is the thing gone?

I can't see, at a glance, anything in the XML that makes the
table so "odd". But I'm not really proficient in reading
WordProcessingML, I just "get along"...

I suspect the problem comes from the file being generated as RTF.
I'm guessing there's something in the writing of the RTF that's
not 100% "kosher", as far as Word 2003/2007 is concerned. I'd
guess the app was developed and tested against earlier versions
of Word? You might contact the company that created this app and
notify them that it's not generating RTF that Word 2003/2007 can
work with correctly.
I see the object in all 3 views (Normal, Web, Print). I do not
see the object when i print preview.

This is also extremely interesting. I wonder if you're supposed
to be able to see it?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17
2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
M

mikenam

I saved it as xml, opened with notepad, deleted the table, opened i
with word2003 and the table like object has been deleted. Thanks Cindy
I don't think there is any I can do to automate deleting this tabl
object.
 
C

Cindy M.

Hi Mikenam,
I saved it as xml, opened with notepad, deleted the table, opened it
with word2003 and the table like object has been deleted. Thanks Cindy.
I don't think there is any I can do to automate deleting this table
object.

Apparently not from within Word as an end-user or via the object model,
anyway.

If you were XML-savvy at the developer level you could probably do it...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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