Last post Jan 14, 2010 06:29 PM by comparador
May 29, 2008 06:45 PM|ricolifts|LINK
I have a .net site that utilizes the code below. But i keep getting a "Command Failed" I assume it is because of the ever famous "Initials Prompt" from microsoft office. How do i auto answer this or disable the prompt or anything that will get me passed
this error? Any thoughts?
'open the file internally in word. In the method all the parameters should be passed by object reference
objWord.Documents.Open(FileName, [readOnly], missing, missing, missing, missing, _
missing, missing, missing, missing, isVisible, missing, _
missing, missing, missing, )
'Do the background activity
objWord.Visible = False
Dim oDoc As Microsoft.Office.Interop.Word.Document = objWord.ActiveDocument
oDoc.SaveAs(FileToSave, fltDocFormat, missing, missing, missing, missing, _
missing, missing, missing, missing, missing, missing, _
missing, [wdTrue], missing, missing)
Jun 04, 2008 01:39 PM|ricolifts|LINK
Ok i found a sollution I don't really like it but basically I created a Application Pool User gave it the propper permissions and logged in answered the Name and Initials question and that allowed me to use the application.
Here are some sources for the settings for the Application Pool User
Application Pool User Office
Jan 14, 2010 06:29 PM|comparador|LINK
You might check for the presence of initials and username in the Registry and if the required values are not there or are empty, proceed with filling them.
From testing on my system I found that if the following values are present and non-empty, then Office uses them without showing the prompt:
In a fresh installation, the UserInfo subkey may have not been created yet.