Consulting

Results 1 to 3 of 3

Thread: Windows Office on the Mac

  1. #1
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location

    Windows Office on the Mac

    It is my understandimg that if one uses "virtual PC" software of some type on the Mac, one can actually run Windows Office in the Mac.

    I have a few questions:

    1. Can one install, and use, the full windoze API, including, e.g., WMI and SendMessage?

    2. When running a Windows Office, does Office VBA think it it is on windows or on the mac?

    For example, what value gets returned by WordBasic.[.GetSystemInfo$](512)?

    3. What character set is used? For example, is the pilcrow code 182 (windoze) or 166 (mac)?

    4. In Word, what value is returned by Application.PathSeparator?

    5. Can one programmatically determine that Office is running in a "virtual pc" instead of windows and that the system is really a mac?

  2. #2
    VBAX Regular zilpher's Avatar
    Joined
    Nov 2004
    Location
    Swindon, UK
    Posts
    30
    Location
    Most Virtual PC software creates a virtual machine upon which can be installed an O/S of your choice (I've been using VMWare on PC to build amongst others, Win95-Longhorn builds and some Linux distros). It's quite weird watching a bios sequence in a window on your desktop machine, already booted into XP.

    Virtual PC for Mac is the same, it creates a software based machine in a window on your Mac onto which you can then install an operating system and ultimately end up with, to all intents and purposes, a windows machine. Micorsoft has more info here:

    http://www.microsoft.com/mac/product...?pid=virtualpc

    To answer your questions (all probably obvious given the above):

    1) yes, depending on the O/S installed, SendMessage is compatible with NT3.1 or later and Windows 95 or later, WMI is compatible with NT4 or later and Win95 or later (in the main)

    2) When running in the virtual machine, Office and VBA will think it's running in windows, because it is. WordBasic.[.GetSystemInfo$](512) is supported by Mac only, but this is a windows machine.

    3) It's a windows machine...

    4) \

    5) Hmmm, now there's a thing.. shortest answer, dunno, short answer, probably. If you control the environments 100% then the simplest way is thru the machine name, I always prefix my virtual machines with VM_ out of habit.

    Have fun with it, Virtual machines are great, hog loads of disk space and allow you to experiment, I think they're great.

    HTH

  3. #3
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Thanx, those are the answers I expected and wanted.

    I asked because I am in the process of converting a large Word project to a VB 6 DLL.

    Project started in April 1996 and grew rapidly.
    In 1998, I developed a parallel VBA version, including emulating some VBA stuff in WordBasic.

    At this point the code should have been able to run on all VBA versions of Office, Mac or windoze, and in any language version.

    In 2000, I decided to can the WordBasic version, but the code should still run on all VBA versions of Word, including the Mac.

    I then began the arduous task of converting the code to pure VBA, getting rid of all WordBasic objects (there are still less than 20 statements using WB, not bad out of 21000+ original WB statements).

    Along the way, I made functional changes, so there's no going back to a WB version.

    Eventually, I will be making design changes to get rid of design forced by the WB roots.

    A few daze ago, I began the task of converting ALL the code to a VB 6 DLL, leaving only the obvious stubs and class instantiation in the Word template.

    I also decided to drop support for Word 97, implying that Mac VBA would not work either as the MAC VBA is not up to VBA 6.

    In converting to VB 6, I guess that the code could work in a "virtual system" on the Mac. There are a few "necessary" API calls.

    I still include code that tests for the Mac and things such as path separator and particular mac/windoze dependent code, such as pilcrow.

    It seems that I could drop the Mac specific code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •