-
WSd_rasley
AskWoody LoungerA friend of ours managed to get the linux passwords reset – I havn’t got a clue how, and perhaps it’s one of those things best left secret. Booting into linux allowed him to scan the Windows files, but not directly boot into Windows. The links in the Lost Password thread should be helpful to actually log into Windows which will make the rest of the job easier. Thanks.
-
WSd_rasley
AskWoody LoungerOctober 6, 2006 at 6:50 pm in reply to: Code to change default email account (Word 2000 / VBA) #1032116I tested your code and couldn’t get all of it to work. Beginning with your first group of code to change the account, strUsersAccount = … equated to “” and then errored on the System.PrivateProfileString command. Perhaps it still doesn’t like IMO-setups?
The next oddity was Set olApp = CreateObject(“Outlook.Application”) – other than a pause nothing visible happened to indicate Outlook started; no splash screen, no taskbar button. I went to the Task Manager and there it was. Not a problem if Outlook is left closed at the end of the program.
The code to check the outgoing item count worked perfectly
and I’ll use that instead of my messagebox solution.
-
WSd_rasley
AskWoody LoungerOctober 5, 2006 at 7:25 pm in reply to: Code to change default email account (Word 2000 / VBA) #1031938Hmmmm….. The
solution of having an extra button-click in the program versus
to update a lot of computers and train-up? Which way would you go?
Maybe when we upgrade the PC’s to Vista…
Anyhow, I’m going to consider my initial questions solved.
I’ve got code that works (maybe not the best but good enough nonetheless), and I’ve learned a good deal in the process.
-
WSd_rasley
AskWoody LoungerOctober 5, 2006 at 7:01 pm in reply to: Code to change default email account (Word 2000 / VBA) #1031928What I get from Control Panel > Mail is the dialog box for Internet Accounts.
-
WSd_rasley
AskWoody LoungerOctober 5, 2006 at 6:37 pm in reply to: Code to change default email account (Word 2000 / VBA) #1031918What, precisely, do you mean by loading a profile for Outlook? All of our installations are set up as Internet Mode Only, and I’ve never seen an option for selecting a profile to use.
I would like to have a procedure in Word to watch Outlook’s Outbox and pause Word until the outgoing message count = 0 and thereby eliminate the need for an artificial pause, but for now I don’t know how to access the folder’s information.
-
WSd_rasley
AskWoody LoungerOctober 5, 2006 at 11:48 am in reply to: Code to change default email account (Word 2000 / VBA) #1031836Is this a frequent task? Would it be too much to ask the user to manually change the default back after completing the merge/send process?
This program would be run every couple of days, in a busy computer room with a history of not following procedures explicitly — past experience tells me that anything more complicated than a button-click leaves the process open to too many human-induced errors.
Perhaps an application-modal messagebox to halt the code’s execution immediately after completing the merge: “Merge complete. Now go to Outlook and make sure the messages get sent before you click this ‘OK’ button.” If they actually wait until the outbox is empty before switching back to Word and clicking the messagebox button, that might be good enough to do the trick.
-
WSd_rasley
AskWoody LoungerOctober 5, 2006 at 2:47 am in reply to: Code to change default email account (Word 2000 / VBA) #1031793Unfortunately, I have to admit that the code is not working as intended. I was hoping that the MailMerge-generated messages would use the changed default email account as the sending account, but they actually used the default account at time they were being sent. The default account was being changed to the alternate account as intended and the messages generated, but by the time they were being sent the default had been changed back — and that was the account being used when Outlook’s ‘send’ took effect. One, maybe two, messages went out using the changed account, but the rest go out with the ‘restored’ default account.
Word doesn’t support a ‘Wait’ command, but Excel’s VBA library does (and the ‘Help’ file gives an excellent example of how to use this code) so I added Excel’s library to the standard ‘Word’ library list and was able to use it to build in a delay before executing the code to restore the original default account. What would have been a 10-second ‘Wait’ delay in Excel ran much longer in Word and still left open the possibility for Outlook to begin sending with the wrong account.
It looks like I may have to use MailMerge to generate the messages and then find a way to determine when Outlook’s ‘Outbox’ folder empties before restoring the default account back to the original value (ie, If count of outgoing messages = 0 then continue with change to default email account).
UNLESS — Would your code example allow the created outgoing messages to use the changed email account as the outgoing account regardless of the default account set at the time the messages are actually sent?
It might help to clarify why these changes are necessary. The MailMerge will be processed and sent out from our IT department but the replies need to be received through a different account. The recipients of the outgoing messages need to be able to ‘Reply’ and have their message go to the desired email account (100% chance the reply would be sent to the correct receiving account, no margin for error allowable). This could easily be accomplished by using a separate PC to create the outgoing messages but there’s no way to reasonably justify the cost of setting up a single-purpose PC just for what is expected to be a temporary (weeks/months vs years) situation.
-
WSd_rasley
AskWoody LoungerOctober 4, 2006 at 3:15 pm in reply to: Code to change default email account (Word 2000 / VBA) #1031710Thanks. Found a workable solution myself though, using WshShell.RegWrite. I had tried using this previously without success – I could manipulate a registry key but Outlook wouldn’t recognize the change. Today I found the key to the puzzle: close Outlook before changing the registry keys, and when Outlook is re-opened the changed values are recognized.
The mostly-finished code (I’d love a variable subject line, using data pulled from the mailmerge source file):
Code:Dim WshShell Sub macStartMerge() On Error GoTo Errors 'Create the Shell object Set WshShell = CreateObject("WScript.Shell") 'Close Outlook before manipulating the system default email account Shell "C:Program FilesAccessoriesTaskill.exe outlook.exe" 'Change the default email account to the desired sending account WshShell.RegWrite "HKCUSoftwareMicrosoftOfficeOutlookOMI Account Manager" _ & "Default Mail Account", "00000002", "REG_SZ" 'Run the mail merge With ActiveDocument.MailMerge .Destination = wdSendToEmail .MailAsAttachment = False .MailAddressFieldName = "EMAIL" .MailSubject = "Subject" .SuppressBlankLines = False With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With .Execute Pause:=True End With 'Restore the default email account WshShell.RegWrite "HKCUSoftwareMicrosoftOfficeOutlookOMI Account Manager" _ & "Default Mail Account", "00000001", "REG_SZ" 'Open Outlook to send the messages Shell "C:Program FilesMicrosoft OfficeOfficeoutlook.exe" 'Everything complete, finish program GoTo Done Errors: 'Display a message box with the error encountered MsgBox ("The program encountered the following error:" & Chr(13) & Chr(10) & _ Chr(10) & Err.Description) Exit Sub Done: End Sub
Taskill is a stand-alone program that can end a running process. http://www.ozemail.com.au/~nulifetv/freezip/freeware%5B/url%5D
-
WSd_rasley
AskWoody LoungerLooks promising, just have to find the time to try it. From the description it looks like the program NtfsFloppySetup.exe can be added to the boot-usb drive and run manually to access an NTFS drive. I have to wonder about the details though, since when I booted from my jump drive it was set up as C:, which is also the designation for my primary drive.
I recently had a near-fatal issue with my main drive and I would have loved a way to boot the system from a jump drive to be able to copy from my main drive to my second drive (both NTFS) before attempting a repair.
-
WSd_rasley
AskWoody LoungerThe option to use the DOS files on the system is inactive if I select FAT or FAT32 formatting; if I select NTFS formatting it doesn’t even allow the ‘Create DOS’ disk option.
-
WSd_rasley
AskWoody LoungerThis is really sweet, but is there some way to make it able to read my NTFS drives?
-
WSd_rasley
AskWoody LoungerThanks for the bad news. So it’s fixed in newer versions… still not enough of a reason to update from 2000. I’ll bet there’s no way to change the default message content either. I’d love to kill the attachment security warning.
-
WSd_rasley
AskWoody LoungerThe FileCopy trick from Hans worked and I’m now getting identical files from the code, so my main concern is taken care of. The bloat is unquestionably metadata, but I’m not really concerned about squeezing it out since the file sizes are still small enough to email conveniently, even with the bloat.
-
WSd_rasley
AskWoody LoungerThat little trick should do the job just right, thanks. I was previously unaware of the FileCopy command but I’m sure I’ll find lots of other uses for it now. To use this fix I’ll have to save, close, FileCopy, and then open again but it should be an easy bit of code to whip together.
-
WSd_rasley
AskWoody LoungerI like Foxit and use it for my primary PDF reader; lightweight and very fast. I keep Adobe though because for some reason Foxit can’t open some of the files I receive – but Adobe has no problem with them. Since disk space will likely never be a problem this approach works very well for me.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
KB5058379 / KB 5061768 Failures
by
crown
2 hours, 4 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
2 hours, 12 minutes ago -
At last – installation of 24H2
by
Botswana12
2 hours, 56 minutes ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
11 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
15 hours, 9 minutes ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
8 hours, 28 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
1 day, 4 hours ago -
Another test post
by
gtd12345
1 day, 4 hours ago -
Connect to someone else computer
by
wadeer
23 hours, 7 minutes ago -
Limit on User names?
by
CWBillow
1 day, 2 hours ago -
Choose the right apps for traveling
by
Peter Deegan
16 hours, 8 minutes ago -
BitLocker rears its head
by
Susan Bradley
9 minutes ago -
Who are you? (2025 edition)
by
Will Fastie
1 hour, 58 minutes ago -
AskWoody at the computer museum, round two
by
Will Fastie
18 hours, 30 minutes ago -
A smarter, simpler Firefox address bar
by
Alex5723
1 day, 15 hours ago -
Woody
by
Scott
2 days ago -
24H2 has suppressed my favoured spider
by
Davidhs
23 hours, 48 minutes ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
2 days, 14 hours ago -
MS Office 365 Home on MAC
by
MickIver
2 days, 8 hours ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
3 days, 4 hours ago -
Flash Drive Eject Error for Still In Use
by
J9438
3 hours, 32 minutes ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
3 days, 23 hours ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
3 days, 23 hours ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
3 days, 3 hours ago -
Migrate off MS365 to Apple Products
by
dmt_3904
3 days, 4 hours ago -
Login screen icon
by
CWBillow
2 days, 18 hours ago -
AI coming to everything
by
Susan Bradley
8 hours, 58 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
4 days, 15 hours ago -
No Screen TurnOff???
by
CWBillow
4 days, 15 hours ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
4 days, 16 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.