tkrainyk,
это ответ с другого форума:
Собственно, правильным способом проверки для 32-битной или 64-битной платформы является использование константы Win64, которая определена во всех версиях VBA (16-разрядная, 32-разрядная и 64-разрядная версии).
Сообщение от tkrainyk
VBA7
— определяет скорее вервию офиса
Между VBA6 и VBA7 мало что изменилось. VBA7 был представлен для поддержки версий 64-bit как Office, так и Windows (см. ниже, в чем заключаются эти различия). Вот основные изменения:
Поддержка 64-bit, в первую очередь для API. Это используется как для того, чтобы ваш код работал с вашей версией OS/Office, так и с другими версиями (например, с кем-то на Office 2003/WinXP)
Если вы находитесь на 64-bit версии Windows, но находитесь на 32-разрядной версии Office, вы можете объявить API вызовов , как показано ниже.
Visual Basic | ||
|
Если вы находитесь на 64-bit версии Windows и на 64-bit версии Office, вы можете объявить API вызов:
Visual Basic | ||
|
The version of Microsoft 365 you have installed may not be ideal. This article explains how to change from a 32-bit install to a 64-bit install or vice versa. Snapshots are included for every step so very easy to follow. Works regardless if you use POP or IMAP accounts in Outlook. Enjoy…
Note: This article was written as a result of a cry for help by a valued Experts Exchange member so that it can hopefully help other users with the same questions as this user posed. (Thanks for your question Basem)
!UPDATE — Added «What if something goes wrong?» to the bottom of this article on May 10th 2021.
In this article, I’ll show you all the steps you need to perform to change a 64-bit installation of Microsoft Office 365 to a 32-bit installation without losing any data whatsoever. The process is pretty much exactly the same if you want to swap from a 32-bit installation to a 64-bit install, so it’s just as easy either way.
That said; let’s get into it…
Pre-requisites
- A copy of Windows 10 — Home / Pro or Education Edition
- A record of your email account passwords in case you need them
- Make a backup of all of your Outlook data to a PST file, especially if using IMAP. Whilst it’s unlikely you’ll need to use the backup, better to make one and be safe than sorry. Look here (Microsoft Link) to learn how to make a backup of your Outlook data.
- Finally, ensure all Office programs are closed before starting this process.
Step 1 — Uninstall your current version of Microsoft Office 365
1. Open Control Panel on your computer (Press your Windows Key, type Control Panel, and hit your Enter key).
2. Click the Programs and Features icon.
3. Click the entry titled Microsoft 365 — en-us, and then click the Uninstall button.
4. Click Yes on the UAC prompt to confirm you want to uninstall.
5. Click the next Uninstall button again on the Ready to uninstall? Prompt.
6. Microsoft Office 365 will now begin to uninstall itself, as shown below. Wait until it has finished uninstalling.
7. When the following window appears, click the Close button and be sure you restart your Windows 10 computer before continuing. Once done, log back into Windows as usual.
8. Now that you have restarted your computer, it’s time to reinstall Office 365, only this time; we’re going to make sure the correct version (32-bit or 64-bit) of the software is installed per your needs or preference.
Step 2 — Reinstall Office 365 in the version that you prefer
1. Open your favourite web browser and navigate to: https://www.office.com/
2. Click the Sign in button to log into office.com
3. Enter your Office 365 account email address and click the Next button. Continue with the login process until you have successfully logged into your Microsoft Office account.
4. Once logged in, click the Install Office button
5. On the next screen, click the Install Office > button once again
! << IMPORTANT >> On the next screen, do not click the Install button yet.
6. First, click Other options as shown below.
7. Click the Drop arrow box that is titled Office — default version (default) under «Choose a version»
8. Here, you need to select either «Office — 32-bit» or «Office-64-bit» to suit which version you want to be installed on your computer or device.
In the above example, I’ve selected the 32-bit version to replace the 64-bit version I already had installed before, which was giving me problems.
9. Now click the Install button.
You will be prompted to save an OfficeSetup.exe file to your computer. Save it to your Download folder or any other location where you will remember it’s been saved.
10. Now minimize your web browser (don’t close it), and open Windows File Explorer. Navigate to where you saved the above OfficeSetup.exe file. Run OfficeSetup.exe by double-clicking it.
11. Click Yes on the UAC Prompt
12. Microsoft Office 365 will begin to install — Wait until it completely finishes installing. You will see the following windows as it’s installing.
13. Once you see the above window, click the Close button, then click your Windows Start button to click on the Outlook icon to fire it up. Or any other Office 365 application if you prefer, but I’ve chosen Outlook for this example because there are a few things I’d like to mention about it.
Note: You will need to recreate any shortcuts you may have made to opening Outlook (and any other Office 365 apps) that you may have had before, such as on your Desktop, Taskbar, etc.
Outlook «should» retain all of your Email account settings and passwords. If it doesn’t, that’s where you may need to re-enter your email accounts and passwords. Providing you know those from memory, or made a note of them as suggested in Pre-requisites at the start of this article, then that should be a trivial matter for you to reconfigure.
What if something goes wrong?
A) Problem — Outlook won’t open
The above-written instructions were thoroughly tested and worked exactly as shown here, however, when the EE asker followed the process, he struck a strange problem that shouldn’t have occurred, so I’m going to describe what to do to quickly resolve the error he encountered in the event that it also happens to someone else. The issue he encountered was this:
I did all the steps as outlined and I was unable to open Outlook after installation of the 32 bit.exe. [OfficeSetup.exe]
I got this error message. Please help me fix this.![]()
The above problem will not normally occur as Outlook should recreate and repopulate a missing OST file from its IMAP server automatically, however, in the event that it does happen, the fix is relatively simple. There are two methods you can use.
Method 1: Restore the previously deleted OST file.
- Open your recycle bin, locate the .ost file you deleted earlier, right-click on it and select Restore, then try opening Outlook again. This replaces the missing OST file and is the quickest method to restore the ability to open and use Outlook again.
- However, if there was corruption in the OST file you restored, then you’ve just put the problem back again in your newly installed copy of Microsoft Outlook. You can try and deal with this using the Microsoft included Scanpst file by following the instructions in this Microsoft Repair Outlook Data Files (.pst and .ost) document.
Method 2: Remove the Outlook Profile that stores the OST file location
To remove the troublesome Outlook profile, complete the following steps:
- Press your Windows Key, type Control Panel and then press your Enter key
Click on the Icon Mail (Microsoft Outlook) (32-bit)
- Click the Show Profiles… button
- Select the profile entry there and click the Remove button
- Click Yes on the next warning to confirm.
- Now close all windows and try opening Outlook again. It should now open without error.
Either of the above two methods will resolve this obscure error.
I hope this helped you out.
Another Concern — I’ve lost my recent document lists!
After reading my article, a fellow EE expert and editor (Thomas Zucker-Scharff) sent me the following message:
Note that you will also lose your recent documents for each O365 app, something I use a lot. I have found that the best way to get these back is to have a second computer wish everything opened. Invariably the registry entry misses the important files.
A valid concern for some, but rather than including information on dealing with that issue here, I’ve decided it will be more useful to write a separate article dedicated to that topic and show the various methods on how to prevent this mild annoyance from happening. That way, it will be easier for people to find the information when searching.
It’s currently being written and should be available by the time you read this at the following location.
- Backup and Restore «Recent Documents» entries in Microsoft Office Apps
Till the next time…
Please, do take a second to click the «Thumbs Up» button if you think this article was helpful and useful. Thank you very much.
©Andrew Leniart 2021
IT Professional | Freelance Journalist
Personal Blog: https://andrewleniart.com
Calvince Nyawara
You can’t mix 64-bit and 32-bit versions of Office. If you do, you will get «Couldn’t install Office». Here is how to clear this error.
Office and Office applications on Windows operating systems come in two “bit versions”. For each version of Office (e.g. Office 2013 or 2016), there are either 32-bit or 64-bit editions.
What does 32 or 64-bit version Mean?
Whether you install a 32 or 64-bit version of Office, you’ll need to make sure all your Office applications are the same bit-version. You can’t mix 64-bit and 32-bit versions of Office on the same computer.
If you try installing a 64-bit version of, say MS Access 2016, while already having a 32-bit version of another Office application on your computer, you may get an error message that looks like this:
Which bit-version should I use?
The bit-version you should use depends in part on the bit version of your Windows operating system (OS), and your computer’s processor. 64-bit software programs only work on a 64-bit OS, while 32-bit programs may work on either a 32-bit or 64-bit OS.
Similarly, a 64-bit OS can only work with a 64-bit processor, while a 32-bit OS works with either 32-bit or 64-bit processors. Most modern computers have 64-bit processors, which have more RAM and tighter security features than older 32-bit processors.
How to find out which version of Office applications you’re using
Step 1: Open any Office application, like Word or Excel, and click on the File tab from the menu bar at the top of the window.
Step 2: Select Account or Help and look under Product Information. Here you’ll see which version of Office you have.
Step 3: To check whether it’s a 32-bit or 64-bit edition, click on the About Word (or About Excel, etc.) section, which will show you more information, including the bit-version
How to switch the Bit-Version of Office You’re Using
Step 1: To switch from using 32-bit to 64-bit Office applications, you’ll first have to uninstall all the 32-bit Office application versions you have on your computer. For help on how to uninstall your Office programs, see this guide here.
Note: you’ll also have to do this to switch from using 64-bit to 32-bit versions of Office
Step 2: Once you’ve fully uninstalled your old version of Office, you can then do a fresh installation of the 64-bit versions after.
If you’re looking for a software company you can trust for its integrity and honest business practices, look no further than SoftwareKeep. We are a Microsoft Certified Partner and a BBB Accredited Business that cares about bringing our customers a reliable, satisfying experience on the software products they need. We will be with you before, during, and after all the sales.
I recently migrated to the 64bit edition of Microsoft Office 2010. My main reason for doing this was that I wanted to make use of the RAM in my machine with PowerPivot, but it certainly didn’t come without a bit of pain. The most notable parts there were that I had to convert a bunch of 32bit API calls in my VBA to 64bit compliant calls while preserving 32bit compatibility for the other machines in my office. Despite my initial intimidation here however, some good friends helped me out and I was up and running within a few hours, and I know believe I understand how to migrate the rest of my code easily. (I may post on that in the near future.)
One challenge I did face though was that you cannot run Office x64 on the same machine as Office x86 (32 bit). To install Office x64 you must uninstall any 32bit version of Office programs first. This means Visio, Project, Office 2007, Office 2003, etc…
My challenge with this is that I teach courses and like (need) to have multiple versions of Office installed so that I can teach in the appropriate versions. I could use a full blown virtual machine, but the problem here is that I find it inconvenient when trying to teach. I can’t flip back and forth between the app and my presentation easily, my presenter mouse doesn’t work in the VM… it just doesn’t work.
So when I installed Office x64, I was a little disappointed. I really wanted to run it side by side with Office 2003 and 2007, but I couldn’t.
But then, in a discussion with one of my staff yesterday, we ended up chatting about Windows XP mode in Windows 7. It IS a virtual machine, but it allows you to run an app installed in the VM as a program from the host (Windows 7) desktop. Here’s a shot out of my start menu of the applications I installed in the Windows XP Mode VM:
So this is pretty cool. I’ve been able to have Excel 2010 x64 open and running on my laptop, and I was able to successfully launch Excel 2003, Excel 2007 and Excel 2010 (32 bit) all together.
The Windows XP mode apps all run on the virtual machine, so they are segregated from my host operating system which makes this possible. I also installed SmartIndenter and MZTools in the VM, and those both show up in the VBE for the apps when I launch it.
I’m really impressed with this. Granted it’s far from perfect application level virtualization, but it allows me to do what I need. All the issues I mentioned above are solved with this. I can run all the versions of the app together, and they seem to run seamlessly.
If you are running Windows 7 and want to check this feature out, here’s the link: http://www.microsoft.com/windows/virtual-pc/download.aspx