From: CyberTaz <
[email protected]>
Newsgroups: microsoft.public.mac.office.excel
Date: Sun, 25 Jun 2006 22:40:59 -0400
Conversation: Office 2004 Graphic Filters
Subject: Re: Office 2004 Graphic Filters
When you right(ctrl)-click an object - such as a chart - the contextual menu
provides a "Save as Picture" command. Selecting that command calls a Save:
Microsoft Excel dialog which contains a list of graphic file formats that
includes JPEG, GIF, PNG, PICT, & BMP.
I have successfully used all I have tried even though there is no
corresponding graphics filter - at least I haven't been able to locate any -
other than the EPS & Metafile filters in the Shared Apps folder. Those,
however, are *Import* filters, not Export filters. I've searched the MS site
& not even found a reference to graphics filters for Office 2004.
That suggests to me that there must be some other variation on the Export
Method or a syntax requirement that isn't disclosed in VBA Help. Wouldn't be
the first help topic that wasn't completely up-to-date. OTOH, perhaps the
filters from Office X need to be used with 2004 if they are required by VBA,
but aren't needed for 'manual' graphics output. Doesn't make sense to me
that code can't make the app do what it is programmed to do without relying
on external filters, but...
Like I keep reminding you, though, a programmer I ain't, so what the answer
is I have no idea. I have posted a request in the MVPs' ng for someone with
VBA know-how to have a look at this thread. I'm sure the cavalry will be
arriving before too long
Regards |:>)
Bob Jones
[MVP] Office:Mac
On 6/25/06 8:49 PM, in article
(e-mail address removed), "Jim"
Bob,
I just tried with the only the filename with .gif as an extention. I
got the same error as before.
I checked my previous version of office for the mac and there were
graphics filters.
Also I've tried selecting the figutre in a chart frame and attempted a
save as. All I saw for file types were those possible for a
spreadsheet. Maybe I don't know how to save/export a spreadsheet Item
correctly.
Thanks for the ideas & interest,
Jim
CyberTaz wrote:
Hi Jim -
I believe this is one difference which is more major than minor. Perhaps I
wasn't clear in what I was trying to say. Take a close look at the VBA Help
quote below which precedes the example you cited. I've marked in brackets
what I believe to be key points:
FilterName [Optional Variant]. The language-independent name of the
graphic
filter as it appears in the [registry]. FilterName must be specified if
FileName
does not include an extension that indicates a recognized image file type.
Some examples of valid FilterName values are GIF, JPEG, and PNG. On the
Macintosh, graphics export filters are installed in the [Microsoft Office
X]:Shared Applications:Graphic Filters folder.
What I take from this is that the filtername argument is *optional* & in
Windows is needed to call the appropriate filter from the *Registry*, which
OS X does not use. Further, the reference to the Shared Applications folder
is based on Office *X* for the location of the filters, but Office 2004
(IIRC) no longer needs them - the graphics formats used by "Save As"
operations are called, I am assuming, from the OS. Have you tried just
outputting the object as "filename.jpeg/.png/etc. without using the filter
argument? As I said, I'm not a coder, so if there is some syntax required
for a system call of some sort I can't say, but I'm pretty sure the filter
isn't supplied by Office.
Regards |:>)
Bob Jones
[MVP] Office:Mac
On 6/25/06 2:30 PM, in article
(e-mail address removed), "Jim"
Bob,
There are some differences, but usually they are minor. I've had
excellent results porting back & forth.
In this case, I can't seem to make this statment (taken from Office for
Mac 2004) to execute:
Charts(1).Export _
FileName:="current_sales.gif", FilterName:="GIF"
Here's the complete help entry one of the items listed when searching
for "export".
Export Method Example
This example exports chart one as a GIF file.
Charts(1).Export _
FileName:="current_sales.gif", FilterName:="GIF"
Thanks,
Jim
---------------------------------------------
CyberTaz wrote:
Hi Jim -
My oversight for not realizing you were trying to do this
programmatically.
Even so, you may find Grab a fun toy to play with if you're not already
familiar with it.
I'm not a programmer, but the thread you cited suggests that the calls on
the Mac may be entirely different due to how graphics are handled on the 2
platforms... My reasoning based on the fact that in Mac XL you can simply
ctrl-click an image & save in the formats you indicated, whereas on the PC
you can't, and there is no 'filter' for either format in the Shared
Applications folder.
Sorry I have nothing more to offer, but perhaps someone else is doing some
research & will respond later. If I can find anything more I will post
back.
Good Luck |:>)
Bob Jones
[MVP] Office:Mac
On 6/25/06 9:01 AM, in article
(e-mail address removed), "Jim"
CT,
What I'd like to do is create and save an image in a particular image
format from within a VBA sub.
I can do that in the PNG format, but I don't have the JPEG or GIF
options available to me in excel. I'd like this to me a "hands-off"
process.
I've determined that I can't do a GIF export because I'm missing the
GIF graphic filter in the Office Shared Applications, Graphic Filters
folder.
Thanks,
Jim
CyberTaz wrote:
You might also want to take a look at the utility called Grab that ships
with OS X. It will probably give you even better results if I am
interpreting you correctly.
HTH |:>)
Bob Jones
[MVP] Office:Mac
On 6/15/06 4:40 PM, in article
(e-mail address removed), "Jim"
When I looked for Graphic Filters in the Office:..:Shared
Applications:Graphics Filters folder, I found none. Where can I get
these?
I need them to save jpeg, gif, etc images of spreadsheets parts. See
thread below>
http://groups.google.com/group/microsoft.public.excel.programming/brows>>>>>>>>
e
hread/1a843aab1053e786/7b78a8ca061e8355?lnk=st&q=jvbeaupre&rnum=4#7b78a>>>>>>>>
8
ca
06
1e
8355