D
David Thielen
Hi;
Our Office AddIn supports Drag-Drop where you drag data from our AddIn
to drop in the office app. In one of the main cases we want to drop a
table.
In Excel a table by definition overwrites a series of cells in the
worksheet. They may be cells that are empty but by definition you
overwrite the cells you drop on top of.
In Word a table by definition is inserted into the document at the
drop point. And this can be done virtual anywhere as a Word document
is just a stream of objects (characters, bitmaps, etc) and a table can
fit in that stream anywhere.
In PowerPoint it is not that simple. If you are dropping text, then if
you drop in a text or table shape, it adds the text at that location
in the text (like Word).
If you drop text outside a shape, PPT creates a text shape at that
location.
But if you drop DataFormats.Html instead of DataFormats.Text for a
paragraph of text (no table) - it places that text in the upper left
corner of the slide and the Selection.TextShape it is placed in cannot
be accessed. PPT is very unhappy with this.
Now moving on to tables. If you drag/drop a table from Word or Excel
into PPT it goes in as text, not a table. But if you copy a table from
either and then paste in PPT - it then creates a table. And that table
is always centered on the slide regardless of the cursor position when
doing the paste.
If you drop an HTML table (from our AddIn), it does nothing.
Question 1: It seems to me that dropping a table needs to always
create a new table shape because of how PPT works. If there is no
table shape on a slide, it must create a table. But if a table shape
does exist and the drop is on the table, PPT in that case creates a
new table shape, so we should follow that approach.
What format does our drop need to be in to accomplish this? Both what
data format do we use (I assume html) and what is the layout format
required (clearly it's not just a <table>...</table>)?
Question 2: For formatted text, such as 4 paragraphs that are a
bulleted list, what is the best data format to drop that as? And is
any specific layout needed? Dropping as TEXT works great, but there is
no formatting. Dropping as HTML is formatted but the location is all
wrong.
thanks - dave
david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm
Our Office AddIn supports Drag-Drop where you drag data from our AddIn
to drop in the office app. In one of the main cases we want to drop a
table.
In Excel a table by definition overwrites a series of cells in the
worksheet. They may be cells that are empty but by definition you
overwrite the cells you drop on top of.
In Word a table by definition is inserted into the document at the
drop point. And this can be done virtual anywhere as a Word document
is just a stream of objects (characters, bitmaps, etc) and a table can
fit in that stream anywhere.
In PowerPoint it is not that simple. If you are dropping text, then if
you drop in a text or table shape, it adds the text at that location
in the text (like Word).
If you drop text outside a shape, PPT creates a text shape at that
location.
But if you drop DataFormats.Html instead of DataFormats.Text for a
paragraph of text (no table) - it places that text in the upper left
corner of the slide and the Selection.TextShape it is placed in cannot
be accessed. PPT is very unhappy with this.
Now moving on to tables. If you drag/drop a table from Word or Excel
into PPT it goes in as text, not a table. But if you copy a table from
either and then paste in PPT - it then creates a table. And that table
is always centered on the slide regardless of the cursor position when
doing the paste.
If you drop an HTML table (from our AddIn), it does nothing.
Question 1: It seems to me that dropping a table needs to always
create a new table shape because of how PPT works. If there is no
table shape on a slide, it must create a table. But if a table shape
does exist and the drop is on the table, PPT in that case creates a
new table shape, so we should follow that approach.
What format does our drop need to be in to accomplish this? Both what
data format do we use (I assume html) and what is the layout format
required (clearly it's not just a <table>...</table>)?
Question 2: For formatted text, such as 4 paragraphs that are a
bulleted list, what is the best data format to drop that as? And is
any specific layout needed? Dropping as TEXT works great, but there is
no formatting. Dropping as HTML is formatted but the location is all
wrong.
thanks - dave
david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm