Office Automation

X

XFourTen

I have been tasked with porting existing code from windows to OS X. I
have office automation (COM) code written in VC++. I have found
postings that state Office 2004 on OS X can interact with AppleScript
and VBA, but I have not found anything regarding programmatic access
from C++.

Obviously the porting task could be done more efficiently and without
error-prone re-write if there are libraries available to intergrate
with C++. So do any such libraries exist??

Thanks in advance for the information!!
 
J

Jim Gordon MVP

Hi,

I suspect you can use C++ but have not found good documentation on how
to go about doing so.

-Jim
 
P

Paul Berkowitz

I don't believe that there are any C++ APIs exposed for Office Mac. It's all
proprietary to Microsoft. You need to use VBA or AppleScript.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
J

Jim Gordon MVP

Hi again,

I think you can accomplish this using the references dialog box in the
visual basic editor. I just don't know how to go about using a
reference once you've made one.

-Jim
 
F

Fredrik Wahlgren

XFourTen said:
I have been tasked with porting existing code from windows to OS X. I
have office automation (COM) code written in VC++. I have found
postings that state Office 2004 on OS X can interact with AppleScript
and VBA, but I have not found anything regarding programmatic access
from C++.

Obviously the porting task could be done more efficiently and without
error-prone re-write if there are libraries available to intergrate
with C++. So do any such libraries exist??

Thanks in advance for the information!!
xll's are still supported. Excel 2004 comes with an xll. Unfortunately, MS
hasn't released any information on how to make xll's for Carbon
applications. The book Excel 95 SDK covered the old Motorola 68000
processor. I *think* that it's easier now but I haven't done an add-in for
Excel since then. If you want to use this SDK, you will need Codewarrior
with CFM support. Translating a COM add-in may be a daunting task. What does
this add-in do?

Without more information, i think your best bet is to use RealBasic
http://www.realbasic.com

/Fredrik
 
X

XFourTen

Thanks to all who responded. I admit it does not seem like great news.

My development background is heavy unix/linux and windows. The last
time I did any Mac developement was at least 10 years ago.

I have no idea what an XLL is, but it almost sounds promising if it is
similar to a DLL. The ability to browse a Dictionary in Applescript
provides insight into what properties, methods and events are exposed.
One cannot rely on documentation, even if it exists ... that is not to
say I would not look at it ;)

But, I would need to create an XLL and that seems to be the missing
piece at this point.

The COM code is backend, non-visual, non-interactive code that inspects
documents and may change standard information. For example, adding a
standard header/footer.

Thanks for the information.
 

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