|
Hi,
Im getting an error "Automation error" when trying to use word from web server.
i have word 2000 and its a windows 2k3 server R2.
Thanks,
Bad Programmer
|
|
|
|
|
I would post a code snipet and the actual error message so that we might be able to help.
Can we assume that MS-Word is installed on the server which your program is running ?
|
|
|
|
|
Automating Word, or any Office app, from ASP.NET is a really bad idea. Read this[^] to find out why.
|
|
|
|
|
have u add all your reference of word 9.0...?
have u create objects...?
can u post your code...?
Rating always..... WELCOME
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
hi guyz...
-> i need some good articles or help regarding bluetooth programming in dotnet... i am also searching
the web but i am unable to find good one... plz help me out with this...
thanks...
take care...
J A Nasir K
|
|
|
|
|
Please do not post the same question in multiple forums - follow the guidelines[^].
MVP 2010 - are they mad?
|
|
|
|
|
I have a peer to peer network and I need to know how I can remind each individual user when it is time to change his/her password. The operating systems are xp home, xp pro, vista home. All help is appreciated.
|
|
|
|
|
I believe you can use WMI and have a logon script that checks the relevant account expiry dates and alert the user that way.
I had a script years ago that i found on google that did this, but don't have it now, so i imagine it will be still out on the net if you have a look on google. (Note: this was for the windows account policies, it is not clear in your original question if this is what you mean by peer to peer network (workgroup) or something else).
|
|
|
|
|
My peer to peer network is a workgroup of individual pc's, not a domain.
|
|
|
|
|
|
Yes it is helpful, but I believe this requires a server. Thank you.
|
|
|
|
|
I don't think a server is required, i just tried this and it told me my account has a maximum password age of 0 so does not expire;
1) Create a text document
2) add the code below and save
3) rename the file password.vbs
double click the file
On Error Resume Next
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
Const E_ADS_PROPERTY_NOT_FOUND = &h8000500D
Const ONE_HUNDRED_NANOSECOND = .000000100
Const SECONDS_IN_DAY = 86400
Set objADSystemInfo = CreateObject("ADSystemInfo") ' LINE 8
Set objUser = GetObject("LDAP://" & objADSystemInfo.UserName) ' LINE 9
intUserAccountControl = objUser.Get("userAccountControl")
If intUserAccountControl And ADS_UF_DONT_EXPIRE_PASSWD Then
WScript.Echo "The password does not expire."
WScript.Quit
Else
dtmValue = objUser.PasswordLastChanged
If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then
WScript.Echo "The password has never been set."
WScript.Quit
Else
intTimeInterval = Int(Now - dtmValue)
WScript.Echo "The password was last set on " & _
DateValue(dtmValue) & " at " & TimeValue(dtmValue) & vbCrLf & _
"The difference between when the password was last" & vbCrLf & _
"set and today is " & intTimeInterval & " days"
End If
Set objDomain = GetObject("LDAP://" & objADSystemInfo.DomainDNSName)
Set objMaxPwdAge = objDomain.Get("maxPwdAge")
If objMaxPwdAge.LowPart = 0 Then
WScript.Echo "The Maximum Password Age is set to 0 in the " & _
"domain. Therefore, the password does not expire."
WScript.Quit
Else
dblMaxPwdNano = _
Abs(objMaxPwdAge.HighPart * 2^32 + objMaxPwdAge.LowPart)
dblMaxPwdSecs = dblMaxPwdNano * ONE_HUNDRED_NANOSECOND
dblMaxPwdDays = Int(dblMaxPwdSecs / SECONDS_IN_DAY)
WScript.Echo "Maximum password age is " & dblMaxPwdDays & " days"
If intTimeInterval >= dblMaxPwdDays Then
WScript.Echo "The password has expired."
Else
WScript.Echo "The password will expire on " & _
DateValue(dtmValue + dblMaxPwdDays) & " (" & _
Int((dtmValue + dblMaxPwdDays) - Now) & " days from today)."
End If
End If
End If
|
|
|
|
|
Dave,
You are right, it worked the same for me. Now, can I set a time in days to expire?
Thank You
|
|
|
|
|
You should be able to. You will just need to find the correct object name to set. You will also need to ensure that the underlying user has the correct security priviliges to do this.
e.g. if the user was already logged on and had no admin rights it would fail,if the system is performing this or an administrator ran the script it would work.
|
|
|
|
|
I will find the correct object and make it work.
You have been a GREAT help.
Thanks again...
|
|
|
|
|
Good morning and thank you for taking the time to read my post. My employer asked me to allow a user to use the left and right arrows to navigate a binding source with navigator. I used the following code:
Protected Overrides Function ProcessKeyPreview(ByRef m As System.Windows.Forms.Message) As Boolean
Select Case m.WParam.ToInt32()
Case 37
Me.DtRecordInfoBindingSource.MovePrevious()
Case 39
Me.DtRecordInfoBindingSource.MoveNext()
End Select
Return False
End Function
It works as expected, the only issue is that in addition to navigating records, the left and right arrow also move through the controls on the form until it reaches a combobox, in which case it navigates through the items in the combobox while navigating records. It not the end of the world, but it is a distraction and bad UI practice. Does anyone know how I can remove the control navigation function and leave only the record navigation?
Cheers ~EA
|
|
|
|
|
Hi,
Have your function return "true" to indicate that it has handled the key
(Source for this answer is here[^])
I are Troll
|
|
|
|
|
|
I am currently trying to make a 'folder organizer' using Visual Basic 2008,
but I have no idea on where to start.
Please give me a few ideas on which statement I need to use.
|
|
|
|
|
Taku Kawamoto wrote: Please give me a few ideas on which statement I need to use.
Have you tried Application.MakeFolderOrganizer() ?!
But seriously, your question is a little vague. Can you supply in more detail what your are trying to do and have you tried anything yet? But going on your question try looking the File class; it provides lots of functionality for creating, moving, copy files and folders etc.
|
|
|
|
|
Application.MakeFolderOrganizer()? No I haven't, I'll go and have a look at it now.
I have been looking at OpenFileDialog(), but I realised that all it does it open files,and I cannot specify the location.
Sorry it's vague; I'm not too sure on the technical terms for VB yet...
I want this application so that I can specify a folder (eg. downloads) then in that folder,
I can sort out all the files inside it into different folders (eg. .exe in 'application' folder, .doc into 'word' folder).
If it's possible I want to make it so that I can manually change how the application sorts out the files, ie. names, size, etc.
|
|
|
|
|
Taku Kawamoto wrote: I want this application so that I can specify a folder (eg. downloads) then in that folder,
I can sort out all the files inside it into different folders (eg. .exe in 'application' folder, .doc into 'word' folder).
If it's possible I want to make it so that I can manually change how the application sorts out the files, ie. names, size, etc.
That's a description that we can work with! Sometimes it's hard to determine what someone wants to achieve.
Anyway, you'd probably be interested in the System.IO.Directory [^] class, especially in the GetFiles and GetDirectories methods. You'd loop through the files, and use the classes in System.IO to organize them.
I are Troll
|
|
|
|
|
Okey, I will have a look at it.
Thanks for the advise.
|
|
|
|
|
You're welcome
You have picked this subject to get hands-on experience with the language? What books are you using?
I are Troll
|
|
|
|
|
Yeah I finished reading and going through Visual Studio 2008 Step by Step, which was long and boring...
So I decided it would be better if I actually code from scratch.
Although I will have to ask people like this, go through help, etc, at least I would understand it after I have finished.
|
|
|
|