Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

vba'ers and .net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zkid - 22 Feb 2006 21:12 GMT
Yesterday I attended an all-Microsoft event that introduced Vista and Office
12.  If anyone else has seen Office 12, I'm wondering if you agree with me
that it looks like it will force all of us VBA programmers to convert our
code to .Net.  Does anyone have any comments?
Karl E. Peterson - 22 Feb 2006 21:21 GMT
> Yesterday I attended an all-Microsoft event that introduced Vista and
> Office
> 12.  If anyone else has seen Office 12, I'm wondering if you agree
> with me that it looks like it will force all of us VBA programmers to
> convert our code to .Net.  Does anyone have any comments?

They *say* they're not going to destroy VBA the way they did VB.  Latest
quotes:

  Microsoft's Upcoming Vista To Support Legacy VB6 Apps
  http://www.devsource.com/article2/0,1895,1929552,00.asp

My short take is, don't invest your intellectual capital in any vehicle not
used by the company that's selling it to you.
Signature

Working without a .NET?
http://classicvb.org/

zkid - 22 Feb 2006 21:56 GMT
Thanks, Karl - the white paper was an interesting read.  

However, my main concern is that at the conference, they told us Office 12
will no longer allow macros inside of documents.  The presenter was unable to
answer my question about templates.  I run my programs from a main template
loaded from the Word Startup folder.  It then retrieves whichever template it
needs for the specified macro, adds the template, and then uses the code from
inside that template to perform the necessary functions.  It then unloads the
template.  The macros are not inside a document per se, but I guess my main
question is that are templates considered documents?

Does anyone out there know if this will still work or if Office 12 will
completely disallow this type of operability?  This is what concerns me the
most.

Thanks again for your response, Karl.

> > Yesterday I attended an all-Microsoft event that introduced Vista and
> > Office
[quoted text clipped - 10 lines]
> My short take is, don't invest your intellectual capital in any vehicle not
> used by the company that's selling it to you.
Jonathan West - 22 Feb 2006 22:19 GMT
> Thanks, Karl - the white paper was an interesting read.
>
> However, my main concern is that at the conference, they told us Office 12
> will no longer allow macros inside of documents.

Ah, that is the docx file format, whyich is an XML fileset compressed inside
a zip archive. They also have the docm file format which the same but does
allow macros inside.

>  The presenter was unable to
> answer my question about templates.  I run my programs from a main
[quoted text clipped - 8 lines]
> main
> question is that are templates considered documents?

I can answer that, based on publicly available bit & pieces I ihave picked
up from the Microsoft website and various blogs. First of all, the old
binary file formats will continue to be supported (including their macros)
but with some restrictions in terms of accessibility to new features in
Office 12. Second, there are XML-based template file formats dotx and dotm
(without and with macros respectively).

> Does anyone out there know if this will still work or if Office 12 will
> completely disallow this type of operability?  This is what concerns me
> the
> most.

You will of course have to test your add-ins thoroughly, and given the new
"ribbon" user interface, you may have some rewriting to do to make it all
work. But my understanding is that the VBA is still there.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org 

Karl E. Peterson - 22 Feb 2006 22:20 GMT
> Thanks, Karl - the white paper was an interesting read.
>
> However, my main concern is that at the conference, they told us
> Office 12 will no longer allow macros inside of documents.

I haven't played with O12 personally, but my understanding is there will be
two supported document formats.  It will still support the old format, but
the new XML format probably won't be very useful for VBA, no.

Which, if you think about it, is really handing the keys to the kingdom over
to the competition.  The only thing that's held back offerings like
OpenOffice so far, is the embedded macro capability offered by Office.
(IMO, of course. <g>)

Anyway, here's lots more to read about upcoming formats:

http://www.google.com/search?q=%22office+12%22+format+site%3Amicrosoft.com

> presenter was unable to answer my question about templates.  I run my
> programs from a main template loaded from the Word Startup folder.
[quoted text clipped - 3 lines]
> template.  The macros are not inside a document per se, but I guess
> my main question is that are templates considered documents?

I think you'll be okay, to an extent.  There are *major* changes in the way
some stuff will work, especially if its twiddling the UI.
Signature

Working without a .NET?
http://classicvb.org/

Jay Freedman - 23 Feb 2006 04:01 GMT
Hi, Karl, good to see you around...

>> Thanks, Karl - the white paper was an interesting read.
>>
[quoted text clipped - 4 lines]
>two supported document formats.  It will still support the old format, but
>the new XML format probably won't be very useful for VBA, no.

I don't think that's true at all. Really, the file format has nothing
to do with whether or not VBA is useful. I've been running a lot of my
old macros in the O12 beta, and it's fully supported -- including a
lot of the old bugs :-[ . There are also new pieces in the object
model for the new features.

>Which, if you think about it, is really handing the keys to the kingdom over
>to the competition.  The only thing that's held back offerings like
[quoted text clipped - 15 lines]
>I think you'll be okay, to an extent.  There are *major* changes in the way
>some stuff will work, especially if its twiddling the UI.

I'll second the opinion that the technique of attaching templates to
use their code will probably work. Whether the macros in those
templates need to be changed depends on what they do, but most
everything still works. In fact, if your macro does "twiddle the UI",
most of that will sort of work too. (Custom toolbars and menus get
translated into special areas on the ribbon.)

As Jonathan explained, you'll need to store your macros in templates
with a .dotm extension.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
Karl E. Peterson - 23 Feb 2006 19:19 GMT
Hi Jay --

> Hi, Karl, good to see you around...

:-)

>>> Thanks, Karl - the white paper was an interesting read.
>>>
[quoted text clipped - 11 lines]
> lot of the old bugs :-[ . There are also new pieces in the object
> model for the new features.

Well, by "useful" (bad choice of words) I meant whether VBA could be strored
within.  Is my initial impression wrong -- that only the old format
documents can embed VBA?

Thanks...   Karl
Signature

Working without a .NET?
http://classicvb.org/

Jonathan West - 23 Feb 2006 20:13 GMT
> Well, by "useful" (bad choice of words) I meant whether VBA could be
> strored
> within.  Is my initial impression wrong -- that only the old format
> documents can embed VBA?

Your initial impression is wrong. There are two flavors of the new format,
indicated by the extensions docx (Word XML document) and docm (Word XML
document with macros). Similarly, templates can have dotx and dotm
extensions.

I understand that the same overall naming convention also applies to Excel
and PowerPoint.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Karl E. Peterson - 23 Feb 2006 20:32 GMT
>> Well, by "useful" (bad choice of words) I meant whether VBA could be
>> strored
[quoted text clipped - 5 lines]
> (Word XML document with macros). Similarly, templates can have dotx
> and dotm extensions.

Ah, but there is a variation that doesn't store VBA within it, eh?  That's
what I was recalling.

Thanks...   Karl
Signature

Working without a .NET?
http://classicvb.org/

zkid - 22 Feb 2006 22:41 GMT
Thanks to both Karl and Jonathan.  I value your feedback and very much
appreciate the links provided.

I'm thinking that Office 12 most likely will not be deplyed until mid-2007
(if that).  I also believe that most busineses will not upgrade for quite
sometime unless purchasing a lot of new computers that will be bundled with
Vista, etc.

I continue to welcome more feedback from our vba community as to what people
are planning to do and if anyone here has "signed" the VB6 petition.

> Thanks, Karl - the white paper was an interesting read.  
>
[quoted text clipped - 27 lines]
> > My short take is, don't invest your intellectual capital in any vehicle not
> > used by the company that's selling it to you.
Karl E. Peterson - 22 Feb 2006 23:32 GMT
> Thanks to both Karl and Jonathan.  I value your feedback and very much
> appreciate the links provided.

A pleasure.

> I continue to welcome more feedback from our vba community as to what
> people are planning to do and if anyone here has "signed" the VB6
> petition.

Signed it?
Signature

Working without a .NET?
http://classicvb.org/

zkid - 23 Feb 2006 03:19 GMT
Ah, yes.  Thanks for reminding me about the difference between docx and docm.
Of course, now, don't forget XAML - XML on steroids.  My eyes were starting
to glaze over after 8 hours....

> Thanks to both Karl and Jonathan.  I value your feedback and very much
> appreciate the links provided.
[quoted text clipped - 38 lines]
> > > My short take is, don't invest your intellectual capital in any vehicle not
> > > used by the company that's selling it to you.
Cindy M  -WordMVP- - 24 Feb 2006 09:45 GMT
Hi =?Utf-8?B?emtpZA==?=,

> I continue to welcome more feedback from our vba community as to what people
> are planning to do and if anyone here has "signed" the VB6 petition.

I have not signed it. OTOH I haven't signed a "get rid of it" petition, either
:-)

I agree with Jay's and Jonathan's takes on the question. VBA will continue to
function as we're accustomed (with the reservations that some things in the
object model may not behave as they used to). Users can still record macros,
even, and these are VBA :-)

I've been investigating the new tools, as they come along, and
   - a classic VB language is still "best", since it's COM automating COM. The
resources that would go into converting the Office apps from COM to managed
code would be immense. That isn't going to happen in this decade, I'd bet.

   - a .NET solution makes sense if you need something .NET provides that
classic VB doesn't (or does only with jumping through a lot of hoops).

   - the development strides being made with each new version of VSTO may
change this, as integration improves and the obstacles between .NET and COM are
discovered and eliminated (as far as the developer is concerned). It makes
sense to re-evaluate regularly. As the newest VSTO (3.0) isn't even in beta,
yet, it's too soon to say whether .NET will become a really good bet with the
new Office version. Ask again next year :-)

Currently, my main focus for "keeping up" is to get as good a grasp on XML
principles as I can. The new file formats are XML, meaning Office files can be
manipulated without even needing VBA (= VBA/automation can concentrate on
interaction with the user). The new interface (Ribbon) is XML based. All kinds
of interesting possibilities are opening up for Office in the area of data
exchange...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)
Jonathan West - 22 Feb 2006 22:08 GMT
> Yesterday I attended an all-Microsoft event that introduced Vista and
> Office
> 12.  If anyone else has seen Office 12, I'm wondering if you agree with me
> that it looks like it will force all of us VBA programmers to convert our
> code to .Net.  Does anyone have any comments?

Unfortunately, those who have seen it in detail (i.e. the beta testers) are
still under NDA and so unable to say very much. But Microsoft has publicly
confirmed that VBA is in Office 2007 and has said it will be in the version
after as well.

I get the impression that the Office folks looked at what happened to VB6,
and decided they didn't need to damage a revenue stream amounting to about a
third of Microsoft's total income by doing the same thing to VBA & Office. I
think they came to conclusions to those I reached back in 2002 when I wrote
the following article

Office and .NET: Better Together?
http://www.ftponline.com/vsm/2002_08/magazine/departments/guestop/default.aspx

At a session I attended last year, when demoing programmability features in
Office 12 all the Microsoft folks went to very great lengths to show that
what could be done using .NET could be done in VBA as well.

Maybe they say different things depending on the audience. I know the
audience on that occasion included a lot of high-quality Office developers,
many of whom were decidedly skeptical about moving to Office 12, especially
if it meant a lot of code rewriting.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Cindy M  -WordMVP- - 24 Feb 2006 09:45 GMT
Hi Jonathan,

> Unfortunately, those who have seen it in detail (i.e. the beta testers) are
> still under NDA and so unable to say very much.

Actually, the NDA for discussing the client app interfaces was rescinded last
week. We can talk about it as much as we like. Anything concerning server apps
is still under the ban. "Dev" stuff is in a bit of limbo (I asked for
clarification on this point, yesterday)...

   Cindy Meister

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.