LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Linked excel objects in word, and my resulting problems :)

Thank you for the link, that is indeed helpful.

I sadly will have a very hard time moving away from the OLE links, as I know nothing about what they will/could be linked to.

On a new note, it seems when any property regarding a LinkFormat object is changed, Word will load and unload the excel file, if I call .Open on the OLEFormat object, will this keep it in memory, thereby making it faster? How do I then get it to close the excel file?

"Jon Peltier" wrote:

Paul -

I can't really offer much about the whole OLE object thing, except that
wherever practical I avoid it by copying and pasting pictures of the
charts. In general I've found it no slower to update the chart in Excel
and copy over a new picture, than to update the OLE object, and the
chart picture routine is much easier.</soapbox

About the source data range.... Excel doesn't expose the data range,
because most of the time it's too complex, with different length series,
discontiguous ranges, even different sheets. But you can access the
series formula for each series, and parse this to get the ranges. John
Walkenbach has even written a handy class module that helps you access
the actual ranges directly:

http://www.j-walk.com/ss/excel/tips/tip83.htm

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Paul DeMarco wrote:

When you want to specify a chart in excel you use something similar
to:

[filename]sheet_name chart_name

why is the filename there for an internal workbook reference? worse
yet, the oleformat.label property for a linked chart from word-excel
uses:

sheet_name![filename]sheet_name chart_name

Whys the sheet there twice? These questions dont matter, just odd,
the next part is the real reason for the post. The problem with all
this is what when the linkformat.sourcefullname property on that
linked chart changes in word, it cannot find the new chart because
the oleformat.label property still contains the old filename, which
was changed.

so how is someone supposed to go about changing the filename that a
linked chart refers to? the oleformat.label property is readonly. I
do not think I can simply remake the oleformat object, although that
would be suitable.

I realize I could completely recreate the linked chart in word, but
the list of properties and child objects to copy settings from would
be immense to guarantee that everything was replicated as is.

Also, when changing the source of a linked excel object in a word
document (that has been resized), it reverts to its full size. Is
there anyway to preserve its position and size, without having to
reset them after changing the linkformat.sourcefullname property.

Finally, since that makes 2 questions, heres the 3rd and final
problem :)

When you want to programatically change the source data range for a
series on an excel chart, it becomes difficult because it doesn't
expose the existing source range as a range, simply as a string. but
that would be less then convenient to parse, is there an easy way to
get that into a range object, so that things like its sheet, and
cells are easily accessible. once that information is there, then
its easy to create a new range and set it as the new source data
range for the chart series.

thanks for any and all comments/help.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When linked objects update in Word,it keeps changing the spacing? Johnylikes Excel Discussion (Misc queries) 1 February 2nd 06 07:22 PM
Problems printing a word document with linked excel tables. jcarlos Excel Discussion (Misc queries) 0 August 30th 05 04:01 PM
Problems Printing a Linked Word document jcarlos Excel Discussion (Misc queries) 0 August 29th 05 09:47 PM
How to change (Excel) source of all linked objects in a word docu. Wheelwater Excel Discussion (Misc queries) 1 April 23rd 05 12:17 PM
Font Changes on Embedded/Linked objects in Word dankim Excel Programming 1 July 22nd 04 04:44 AM


All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"