-
WSkarinathomas
AskWoody LoungerHi Phil and John,
Thanks for the product reference, I’ll check this out. I seemed to recall WordPerfect having a viewer, but noticed that it was strangely missing from their website, so I’m glad there is an alternative…bummer it’s not free though ! At any rate, we would prefer to use a viewer like this rather than Word’s viewers because we need the document to look as it did when it was originally created, and as we all know, Word’s converters won’t do that for us.
Thanks again, much appreciated!
-
WSkarinathomas
AskWoody LoungerHi Phil and John,
Thanks for the product reference, I’ll check this out. I seemed to recall WordPerfect having a viewer, but noticed that it was strangely missing from their website, so I’m glad there is an alternative…bummer it’s not free though ! At any rate, we would prefer to use a viewer like this rather than Word’s viewers because we need the document to look as it did when it was originally created, and as we all know, Word’s converters won’t do that for us.
Thanks again, much appreciated!
-
WSkarinathomas
AskWoody LoungerThanks John, that’s great! I’m playing around with it now, I’m sure this will solve my dilemna!
-
WSkarinathomas
AskWoody LoungerThanks John, that’s great! I’m playing around with it now, I’m sure this will solve my dilemna!
-
WSkarinathomas
AskWoody LoungerThanks all for your input. In the end I decided to use the following code (provided by Helmut on another forum):
Dim oDot As Document
Set oDot = Documents.Open(strUserTemplateDir & Application.PathSeparator & pcNormal, Visible:=False)
With oDot
.PageSetup.LeftMargin = InchesToPoints(1)
.PageSetup.RightMargin = InchesToPoints(1)
.Styles(wdStyleNormal).Font.Name = “Times New Roman”
.Styles(wdStyleNormal).Font.Size = 12
.Save
.Close
End WithUltimately I wanted to modify the user’s Normal.dot to set their defaults, when they invoke it (i.e., click a button). I originally wanted to do it using the equivalent of the ‘Default’ button in Page Setup, Font and Language dialog boxes, mainly so that I wouldn’t have to open the Normal.dot, because I didn’t want the user to see the Normal.dot opened and closed. Helmut’s code provided the perfect solution, which opens the Normal.dot to edit it, and doesn’t make it visible to the user. Not surprising that the original code I was trying to use, which was from the Word VBA Help, didn’t do what it was supposed to!
-
WSkarinathomas
AskWoody LoungerThanks all for your input. In the end I decided to use the following code (provided by Helmut on another forum):
Dim oDot As Document
Set oDot = Documents.Open(strUserTemplateDir & Application.PathSeparator & pcNormal, Visible:=False)
With oDot
.PageSetup.LeftMargin = InchesToPoints(1)
.PageSetup.RightMargin = InchesToPoints(1)
.Styles(wdStyleNormal).Font.Name = “Times New Roman”
.Styles(wdStyleNormal).Font.Size = 12
.Save
.Close
End WithUltimately I wanted to modify the user’s Normal.dot to set their defaults, when they invoke it (i.e., click a button). I originally wanted to do it using the equivalent of the ‘Default’ button in Page Setup, Font and Language dialog boxes, mainly so that I wouldn’t have to open the Normal.dot, because I didn’t want the user to see the Normal.dot opened and closed. Helmut’s code provided the perfect solution, which opens the Normal.dot to edit it, and doesn’t make it visible to the user. Not surprising that the original code I was trying to use, which was from the Word VBA Help, didn’t do what it was supposed to!
-
WSkarinathomas
AskWoody LoungerThanks Howard. I understand that standard new documents are based on Normal.dot. I would rather not have to open the user’s Normal.dot to do this, especially when the code I am trying to use is ‘supposed to’, according to VBA Help, save the settings to the attached template, basically doing the equivalent of clicking the Default button in a dialog box like File, Page Setup.
I don’t think AutoNew macros are going to work for what we are trying to achieve, which is basically that the user can click a button on their toolbar (so it is self-invoked) which will in turn set a number of our corporate ‘standard’ defaults in their Normal.dot for them. We want them to be able to do this if they choose (hence they run it from a button), and we are coding it so that they don’t have to ‘know’ the standards and do them one at a time on their own. We are setting the language, margins, font, and copying in our standard styles. The language setting works fine, and copying the standard styles to Normal.dot works fine. But the .SetAsTemplateDefault for the l/r margins is not working.
-
WSkarinathomas
AskWoody LoungerThanks Howard. I understand that standard new documents are based on Normal.dot. I would rather not have to open the user’s Normal.dot to do this, especially when the code I am trying to use is ‘supposed to’, according to VBA Help, save the settings to the attached template, basically doing the equivalent of clicking the Default button in a dialog box like File, Page Setup.
I don’t think AutoNew macros are going to work for what we are trying to achieve, which is basically that the user can click a button on their toolbar (so it is self-invoked) which will in turn set a number of our corporate ‘standard’ defaults in their Normal.dot for them. We want them to be able to do this if they choose (hence they run it from a button), and we are coding it so that they don’t have to ‘know’ the standards and do them one at a time on their own. We are setting the language, margins, font, and copying in our standard styles. The language setting works fine, and copying the standard styles to Normal.dot works fine. But the .SetAsTemplateDefault for the l/r margins is not working.
-
WSkarinathomas
AskWoody LoungerSeptember 14, 2004 at 10:52 pm in reply to: Sorting Information in a RecordSet (Word 2003 VBA) #877250Elvis (aka Rory) you’re beautiful!!!
Thank you SO much! It works wonderfully! -
WSkarinathomas
AskWoody LoungerSeptember 14, 2004 at 10:52 pm in reply to: Sorting Information in a RecordSet (Word 2003 VBA) #877251Elvis (aka Rory) you’re beautiful!!!
Thank you SO much! It works wonderfully! -
WSkarinathomas
AskWoody LoungerSeptember 13, 2004 at 4:22 pm in reply to: Sorting Information in a RecordSet (Word 2003 VBA) #876578Bummer, no, I tried it and it still stops on .Sort and gives me the ‘Invalid use of property’ error when I compile. Is it possible that I need a reference of some sort? I didn’t think so, but I’m grasping at straws now!
-
WSkarinathomas
AskWoody LoungerSeptember 13, 2004 at 4:22 pm in reply to: Sorting Information in a RecordSet (Word 2003 VBA) #876579Bummer, no, I tried it and it still stops on .Sort and gives me the ‘Invalid use of property’ error when I compile. Is it possible that I need a reference of some sort? I didn’t think so, but I’m grasping at straws now!
-
WSkarinathomas
AskWoody LoungerSeptember 7, 2004 at 6:32 pm in reply to: Pulling a list of all users from Active Directory (Word 2003 VBA) #874307I managed to get it to work, but only if I place the code in the user form, not if I call it. Obviously something needs to be public, but I’m not sure what. I tried making the rs variable public, but that didn’t do it. I’m shooting in the dark here. The code I have now in the user form is as follows:
Private Sub GetUserList()
Dim conn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim oRoot As IADs
Dim oDomain As IADs
Dim sBase As String
Dim sFilter As String
Dim sDomain As String
Dim sAttribs As String
Dim sDepth As String
Dim sQuery As String
Dim user As IADsUserOn Error GoTo ErrHandler:
Set oRoot = GetObject(“LDAP://rootDSE”)
‘Work in the default domain
sDomain = oRoot.Get(“defaultNamingContext”)
Set oDomain = GetObject(“LDAP://” & sDomain)
sBase = “”
‘Get record set
sFilter = “(&(objectCategory=person)(objectClass=user)(extensionattribute1=*))”
sAttribs = “cn,distinguishedName,extensionattribute1,givenName,sn,MiddleName,Title,PersonalTitle,telephoneNumber,mail,Initials,Department,Division,physicalDeliveryOfficeName,Description”
sDepth = ADS_SCOPE_SUBTREEsQuery = sBase & “;” & sFilter & “;” & sAttribs & “;” & sDepth
conn.Open “Data Source=Active Directory Provider;Provider=ADsDSOObject”
Set rs = conn.Execute(sQuery)
rs.MoveFirst
While Not rs.EOF
cboAuthor.AddItem rs.Fields(2).Value
rs.MoveNext
WendErrHandler:
On Error Resume Next
If Not rs Is Nothing Then
If rs.State 0 Then rs.Close
Set rs = Nothing
End IfIf Not conn Is Nothing Then
If conn.State 0 Then conn.Close
Set conn = Nothing
End IfSet oRoot = Nothing
Set oDomain = NothingEnd Sub
-
WSkarinathomas
AskWoody LoungerSeptember 7, 2004 at 6:32 pm in reply to: Pulling a list of all users from Active Directory (Word 2003 VBA) #874308I managed to get it to work, but only if I place the code in the user form, not if I call it. Obviously something needs to be public, but I’m not sure what. I tried making the rs variable public, but that didn’t do it. I’m shooting in the dark here. The code I have now in the user form is as follows:
Private Sub GetUserList()
Dim conn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim oRoot As IADs
Dim oDomain As IADs
Dim sBase As String
Dim sFilter As String
Dim sDomain As String
Dim sAttribs As String
Dim sDepth As String
Dim sQuery As String
Dim user As IADsUserOn Error GoTo ErrHandler:
Set oRoot = GetObject(“LDAP://rootDSE”)
‘Work in the default domain
sDomain = oRoot.Get(“defaultNamingContext”)
Set oDomain = GetObject(“LDAP://” & sDomain)
sBase = “”
‘Get record set
sFilter = “(&(objectCategory=person)(objectClass=user)(extensionattribute1=*))”
sAttribs = “cn,distinguishedName,extensionattribute1,givenName,sn,MiddleName,Title,PersonalTitle,telephoneNumber,mail,Initials,Department,Division,physicalDeliveryOfficeName,Description”
sDepth = ADS_SCOPE_SUBTREEsQuery = sBase & “;” & sFilter & “;” & sAttribs & “;” & sDepth
conn.Open “Data Source=Active Directory Provider;Provider=ADsDSOObject”
Set rs = conn.Execute(sQuery)
rs.MoveFirst
While Not rs.EOF
cboAuthor.AddItem rs.Fields(2).Value
rs.MoveNext
WendErrHandler:
On Error Resume Next
If Not rs Is Nothing Then
If rs.State 0 Then rs.Close
Set rs = Nothing
End IfIf Not conn Is Nothing Then
If conn.State 0 Then conn.Close
Set conn = Nothing
End IfSet oRoot = Nothing
Set oDomain = NothingEnd Sub
-
WSkarinathomas
AskWoody LoungerSeptember 7, 2004 at 5:45 pm in reply to: Pulling a list of all users from Active Directory (Word 2003 VBA) #874297Here I am…stumped again. I have pulled out a recordset from AD, and now I am trying to populate a combobox with the displayName field. I can get it to print to the Immediate window just fine, but not add the item to the combobox…
Private Sub UserForm_Initialize()
Dim conn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim oRoot As IADs
Dim oDomain As IADs
Dim sBase As String
Dim sFilter As String
Dim sDomain As String
Dim sAttribs As String
Dim sDepth As String
Dim sQuery As String
Dim user As IADsUserOn Error GoTo ErrHandler:
Set oRoot = GetObject(“LDAP://rootDSE”)
sDomain = oRoot.Get(“defaultNamingContext”)
Set oDomain = GetObject(“LDAP://” & sDomain)
sBase = “”
sFilter = “(&(objectCategory=person)(objectClass=user)(displayName=Thomas, K*))”
sAttribs= “cn,distinguishedName,displayName,givenName,sn,MiddleName,Title,PersonalTitle,telephoneNumber,mail,Initials,Department,Division,physicalDeliveryOfficeName,Description”
sDepth = ADS_SCOPE_SUBTREE
sQuery = sBase & “;” & sFilter & “;” & sAttribs & “;” & sDepth
conn.Open “Data Source=Active Directory Provider;Provider=ADsDSOObject”
Set rs = conn.Execute(sQuery)rs.MoveFirst
While Not rs.EOF
For i = 0 To rs.RecordCount
frmUserForm1.cboAuthor.AddItem rs.Fields(2).Value
Next ‘i
rs.MoveNext
Wendrs.Close
ErrHandler:
On Error Resume Next
If Not rs Is Nothing Then
If rs.State 0 Then rs.Close
Set rs = Nothing
End IfIf Not conn Is Nothing Then
If conn.State 0 Then conn.Close
Set conn = Nothing
End IfSet oRoot = Nothing
Set oDomain = NothingEnd Sub
Any ideas?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
Blocking Search (on task bar) from going to web
by
HenryW
4 hours, 21 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
9 hours, 29 minutes ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
9 hours, 35 minutes ago -
regarding april update and may update
by
heybengbeng
11 hours, 5 minutes ago -
MS Passkey
by
pmruzicka
7 hours, 9 minutes ago -
Can’t make Opera my default browser
by
bmeacham
18 hours, 45 minutes ago -
*Some settings are managed by your organization
by
rlowe44
5 hours, 28 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
17 hours, 39 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
1 day, 13 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
1 day, 22 hours ago -
AI slop
by
Susan Bradley
12 hours, 27 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
1 day, 23 hours ago -
Two blank icons
by
CR2
11 hours, 22 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
2 days, 8 hours ago -
End of 10
by
Alex5723
2 days, 11 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
1 day, 9 hours ago -
test post
by
gtd12345
2 days, 17 hours ago -
Privacy and the Real ID
by
Susan Bradley
2 days, 7 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
9 hours, 41 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
2 days, 21 hours ago -
Upgrading from Win 10
by
WSjcgc50
1 day, 9 hours ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
1 day, 12 hours ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
3 days, 13 hours ago -
The story of Windows Longhorn
by
Cybertooth
3 days ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
3 days, 15 hours ago -
Are manuals extinct?
by
Susan Bradley
15 hours, 34 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
4 days ago -
Network Issue
by
Casey H
3 days, 11 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
4 days, 12 hours ago -
May 2025 Office non-Security updates
by
PKCano
4 days, 12 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.