locked
Office 2003 Initials Prompt RRS feed

  • Question

  • User15800025 posted

    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)
     
    Thursday, May 29, 2008 6:45 PM

Answers

All replies

  • User15800025 posted

    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

    http://beyondthispoint.blogspot.com/2006/04/setting-up-iis6-application-pool.html

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 4, 2008 1:39 PM
  • User160765068 posted

    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:

    HKEY_CURRENT_USER\Software\Microsoft\Office\Common\UserInfo\UserInitials (REG_SZ)

    HKEY_CURRENT_USER\Software\Microsoft\Office\Common\UserInfo\UserName (REG_SZ)

    In a fresh installation, the UserInfo subkey may have not been created yet.


    Thursday, January 14, 2010 6:29 PM