| Home | Forums | Reviews | Guides | Newsgroups | Register | Search |
![]() |
| Thread Tools |
| Elizabeth Harmon |
|
|
|
| |
|
Martin
Guest
Posts: n/a
|
This is typically an identity issue. If you mess with DCOMCNFG and you
want a GUI to pop up, make sure the application is run by "the interactive user". You can set this on the Identity tab of DCOMCNFG properties. From a DCOM perspective, the interactive user "owns" the GUI, hence any (pseudo-)remote clients will not get access to the GUI when calling services with their own identity. "Elizabeth Harmon" <> wrote in message news:... > Hi All > > I am attempting to open a Word App from a web page on the client and so far > everything > works (After reconfig of dcomcnfg for Microsoft Word Document). I have one > minor problem, i cannot get the application to become visible > **********What am i doing wrong? is there something else that needs to be > done to make the application visible? I am using windows 2000 and Word 2002 > > thanks in advance > > Samantha > > Below is the Code i am using: > Class Declarations: > > Public WrdApp As Word.ApplicationClass > > Public wrdLetter As Word.Document > > > > In Private Sub : > > If WrdApp Is Nothing Then > WrdApp = New Word.ApplicationClass > > WrdApp.Visible = True > > WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize > > End If > > wrdLetter = New Word.Document > > Dim strNewFilePath As String = "C:\Temp\" > > Dim strUniqId As String = Date.Now.Hour.ToString() & > Date.Now.Minute.ToString() > > Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() & > CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") & > strUniqId.Replace(":", "-") & ".doc" > > Dim missing As Object > > missing = System.Reflection.Missing.Value > > wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True, > missing, missing, missing, missing, missing, missing, missing, isVisible, > missing, missing) > > wrdLetter.Activate() > > wrdLetter.Bookmarks.Item("TodayDate").Range.Text = > FormatDateTime(Date.Now(), DateFormat.ShortDate) > > wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName > > wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN > > wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval > > wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName > > wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName > > wrdLetter.SaveAs(strNewFilePath & NewFileName) > > wrdLetter.PrintPreview() > > 'WrdApp_DocumentBeforeClose(wrdLetter, False) > > wrdLetter.Close() > > System.Runtime.InteropServices.Marshal.ReleaseComO bject(wrdLetter) > > wrdLetter = Nothing > > WrdApp.Application.Quit() > > System.Runtime.InteropServices.Marshal.ReleaseComO bject(WrdApp) > > WrdApp = Nothing > > fileName = Nothing > > isVisible = Nothing > > readonlyAcc = Nothing > > > |
|
|
|
|
|||
|
|||
| Martin |
|
|
|
| |
|
Elizabeth Harmon
Guest
Posts: n/a
|
Does this mean that i should Make the ASP_NET user or the IUSR_MAchineName
part of another group that has rights to Use the GUI and Application? Thanks in advance Samantha "Martin" <> wrote in message news:3fca1007$0$127$4all. nl... > This is typically an identity issue. If you mess with DCOMCNFG and you > want a GUI to pop up, make sure the application is run by "the interactive > user". You can set this on the Identity tab of DCOMCNFG properties. > > From a DCOM perspective, the interactive user "owns" the GUI, hence > any (pseudo-)remote clients will not get access to the GUI when calling > services with their own identity. > > > "Elizabeth Harmon" <> wrote in message > news:... > > Hi All > > > > I am attempting to open a Word App from a web page on the client and so > far > > everything > > works (After reconfig of dcomcnfg for Microsoft Word Document). I have one > > minor problem, i cannot get the application to become visible > > **********What am i doing wrong? is there something else that needs to be > > done to make the application visible? I am using windows 2000 and Word > 2002 > > > > thanks in advance > > > > Samantha > > > > Below is the Code i am using: > > Class Declarations: > > > > Public WrdApp As Word.ApplicationClass > > > > Public wrdLetter As Word.Document > > > > > > > > In Private Sub : > > > > If WrdApp Is Nothing Then > > WrdApp = New Word.ApplicationClass > > > > WrdApp.Visible = True > > > > WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize > > > > End If > > > > wrdLetter = New Word.Document > > > > Dim strNewFilePath As String = "C:\Temp\" > > > > Dim strUniqId As String = Date.Now.Hour.ToString() & > > Date.Now.Minute.ToString() > > > > Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() & > > CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") & > > strUniqId.Replace(":", "-") & ".doc" > > > > Dim missing As Object > > > > missing = System.Reflection.Missing.Value > > > > wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True, > > missing, missing, missing, missing, missing, missing, missing, isVisible, > > missing, missing) > > > > wrdLetter.Activate() > > > > wrdLetter.Bookmarks.Item("TodayDate").Range.Text = > > FormatDateTime(Date.Now(), DateFormat.ShortDate) > > > > wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName > > > > wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN > > > > wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval > > > > wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName > > > > wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName > > > > wrdLetter.SaveAs(strNewFilePath & NewFileName) > > > > wrdLetter.PrintPreview() > > > > 'WrdApp_DocumentBeforeClose(wrdLetter, False) > > > > wrdLetter.Close() > > > > System.Runtime.InteropServices.Marshal.ReleaseComO bject(wrdLetter) > > > > wrdLetter = Nothing > > > > WrdApp.Application.Quit() > > > > System.Runtime.InteropServices.Marshal.ReleaseComO bject(WrdApp) > > > > WrdApp = Nothing > > > > fileName = Nothing > > > > isVisible = Nothing > > > > readonlyAcc = Nothing > > > > > > > > |
|
|
|
|
|||
|
|||
| Elizabeth Harmon |
|
Martin
Guest
Posts: n/a
|
Samantha,
I am not quite sure what you are trying to do, the problem just sounded familiar and I guessed I would put you on the right track by telling you about the identity of the launching user. Perhaps I just sent you further into the woods. > Does this mean that i should Make the ASP_NET user or the IUSR_MAchineName > part of another group that has rights to Use the GUI and Application? I don't think you can delegate the right to use the GUI to anyone but the logged on user. This is why the very action is delegated to the logged on user. Re-reading your earlier message I understand you want to open a Word document (which is located on the server) on the client, outside of your browser, by automating Word through client side script. If this is the case, IUSR_MachineName isn't of much use since it lives on the server. The client side script code should be executed under your visitor's account, the one that started the browser, which is the interactive user on the client side. I don't see an identity issue there. Now I believe the problem is in the way you address word from script. There should be a method or property on the "Word.Application" object that tells it to show a GUI or not. http://msdn.microsoft.com/library/de...properties.asp Try theVisible property and forget about DCOMCNFG altogether.. "Elizabeth Harmon" <> wrote in message news:%... > Does this mean that i should Make the ASP_NET user or the IUSR_MAchineName > part of another group that has rights to Use the GUI and Application? > > Thanks in advance > Samantha > "Martin" <> wrote in message > news:3fca1007$0$127$4all. nl... > > This is typically an identity issue. If you mess with DCOMCNFG and you > > want a GUI to pop up, make sure the application is run by "the interactive > > user". You can set this on the Identity tab of DCOMCNFG properties. > > > > From a DCOM perspective, the interactive user "owns" the GUI, hence > > any (pseudo-)remote clients will not get access to the GUI when calling > > services with their own identity. > > > > > > "Elizabeth Harmon" <> wrote in message > > news:... > > > Hi All > > > > > > I am attempting to open a Word App from a web page on the client and so > > far > > > everything > > > works (After reconfig of dcomcnfg for Microsoft Word Document). I have > one > > > minor problem, i cannot get the application to become visible > > > **********What am i doing wrong? is there something else that needs to > be > > > done to make the application visible? I am using windows 2000 and Word > > 2002 > > > > > > thanks in advance > > > > > > Samantha > > > > > > Below is the Code i am using: > > > Class Declarations: > > > > > > Public WrdApp As Word.ApplicationClass > > > > > > Public wrdLetter As Word.Document > > > > > > > > > > > > In Private Sub : > > > > > > If WrdApp Is Nothing Then > > > WrdApp = New Word.ApplicationClass > > > > > > WrdApp.Visible = True > > > > > > WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize > > > > > > End If > > > > > > wrdLetter = New Word.Document > > > > > > Dim strNewFilePath As String = "C:\Temp\" > > > > > > Dim strUniqId As String = Date.Now.Hour.ToString() & > > > Date.Now.Minute.ToString() > > > > > > Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() > & > > > CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") & > > > strUniqId.Replace(":", "-") & ".doc" > > > > > > Dim missing As Object > > > > > > missing = System.Reflection.Missing.Value > > > > > > wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True, > > > missing, missing, missing, missing, missing, missing, missing, > isVisible, > > > missing, missing) > > > > > > wrdLetter.Activate() > > > > > > wrdLetter.Bookmarks.Item("TodayDate").Range.Text = > > > FormatDateTime(Date.Now(), DateFormat.ShortDate) > > > > > > wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName > > > > > > wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN > > > > > > wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval > > > > > > wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName > > > > > > wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName > > > > > > wrdLetter.SaveAs(strNewFilePath & NewFileName) > > > > > > wrdLetter.PrintPreview() > > > > > > 'WrdApp_DocumentBeforeClose(wrdLetter, False) > > > > > > wrdLetter.Close() > > > > > > System.Runtime.InteropServices.Marshal.ReleaseComO bject(wrdLetter) > > > > > > wrdLetter = Nothing > > > > > > WrdApp.Application.Quit() > > > > > > System.Runtime.InteropServices.Marshal.ReleaseComO bject(WrdApp) > > > > > > WrdApp = Nothing > > > > > > fileName = Nothing > > > > > > isVisible = Nothing > > > > > > readonlyAcc = Nothing > > > > > > > > > > > > > > > |
|
|
|
|
|||
|
|||
| Martin |
|
Martin
Guest
Posts: n/a
|
> The client side script code should be executed under your
> visitor's account, the one that started the browser, which is the > interactive user on the client side. I don't see an identity issue there. This had better not be true since it would enable a web site developer to erase the visitor's local hard disk using client side script. I am not too confident in this area. Anyway, check out that Visible property. Martin. |
|
|
|
|
|||
|
|||
| Martin |
|
Elizabeth Harmon
Guest
Posts: n/a
|
Martin
Thanks for your help. I am passing back information From the Server to a web page, and then Opening Word on the Client side and then filling bookmarks on the Word Template that is located on the Client in an intranet website, with the code below: ************************************************** *************** If WrdApp Is Nothing Then WrdApp = New Word.ApplicationClass WrdApp.Visible = True WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize End If wrdLetter = New Word.Document Dim strNewFilePath As String = "C:\Temp\" Dim strUniqId As String = Date.Now.Hour.ToString() & Date.Now.Minute.ToString() Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() & CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") & strUniqId.Replace(":", "-") & ".doc" Dim missing As Object missing = System.Reflection.Missing.Value wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True, missing, missing, missing, missing, missing, missing, missing, isVisible, missing, missing) wrdLetter.Activate() wrdLetter.Bookmarks.Item("TodayDate").Range.Text = FormatDateTime(Date.Now(), DateFormat.ShortDate) wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName wrdLetter.SaveAs(strNewFilePath & NewFileName) wrdLetter.PrintPreview() 'WrdApp_DocumentBeforeClose(wrdLetter, False) ************************************************** ************************** ***** I can send the information, the word doc file gets its bookmarks filled and it is saved on the local client, the only thing missing is the GUI of Word which never appears to become visible even though i issue a Visible = true propety of the Word App. What i want is for the User to see the document so they can review it or make any changes to the document. I have disabled the interactive user for an indentity that has full rights to the Client machine, i just dont understand why the Visible property is not being understood. Thanks in advance Samantha "Martin" <> wrote in message news:3fca5209$0$123$4all. nl... > > The client side script code should be executed under your > > visitor's account, the one that started the browser, which is the > > interactive user on the client side. I don't see an identity issue there. > > This had better not be true since it would enable a web site developer > to erase the visitor's local hard disk using client side script. I am not > too confident in this area. Anyway, check out that Visible > property. > > Martin. > > |
|
|
|
|
|||
|
|||
| Elizabeth Harmon |
|
Martin
Guest
Posts: n/a
|
Okay, here's another thought.
You seem to start Word as a COM server by obtainig an interface. Then you talk to the interface and I presume the client side script runs out of scope at some point. That would be the time for the script interpreter to release the interface if you had not done so yourself by setting your WrdApp to Nothing. Word would notice there are no COM clients left and would terminate. The whole thing could be going so fast that you would never see the Word GUI. If this is indeed what is happening, it would help to just start Word before the firt interface is obtained through WrdApp = New Word.ApplicationClass Does it work the way you want it to if Word is already up before the script kicks in? If so, you need to have the script start a Word instance if it not already there. I don't want to start thinking about how to do that yet. Better yet would be to have some sort of client side session object to store your WrdApp in , preventing it from running out of scope. I hope this makes any sense. Martin. "Elizabeth Harmon" <> wrote in message news:... > Martin > > Thanks for your help. > > I am passing back information From the Server to a web page, and then > Opening Word on the Client side and then filling bookmarks on the Word > Template that is located on the Client in an intranet website, with the code > below: > > ************************************************** *************** > If WrdApp Is Nothing Then > WrdApp = New Word.ApplicationClass > > WrdApp.Visible = True > > WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize > > End If > > wrdLetter = New Word.Document > > Dim strNewFilePath As String = "C:\Temp\" > > Dim strUniqId As String = Date.Now.Hour.ToString() & > Date.Now.Minute.ToString() > > Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() & > CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") & > strUniqId.Replace(":", "-") & ".doc" > > Dim missing As Object > > missing = System.Reflection.Missing.Value > > wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True, > missing, missing, missing, missing, missing, missing, missing, isVisible, > missing, missing) > > wrdLetter.Activate() > > wrdLetter.Bookmarks.Item("TodayDate").Range.Text = > FormatDateTime(Date.Now(), DateFormat.ShortDate) > > wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName > > wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN > > wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval > > wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName > > wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName > > wrdLetter.SaveAs(strNewFilePath & NewFileName) > > wrdLetter.PrintPreview() > > 'WrdApp_DocumentBeforeClose(wrdLetter, False) > > ************************************************** ************************** > ***** > > I can send the information, the word doc file gets its bookmarks filled and > it is saved on the local client, the only thing missing is the GUI of Word > which never appears to become visible even though i issue a Visible = true > propety of the Word App. > > What i want is for the User to see the document so they can review it or > make any changes to the document. I have disabled the interactive user for > an indentity that has full rights to the Client machine, i just dont > understand why the Visible property is not being understood. > > Thanks in advance > Samantha > > "Martin" <> wrote in message > news:3fca5209$0$123$4all. nl... > > > The client side script code should be executed under your > > > visitor's account, the one that started the browser, which is the > > > interactive user on the client side. I don't see an identity issue > there. > > > > This had better not be true since it would enable a web site developer > > to erase the visitor's local hard disk using client side script. I am not > > too confident in this area. Anyway, check out that Visible > > property. > > > > Martin. > > > > > > |
|
|
|
|
|||
|
|||
| Martin |
|
Elizabeth Harmon
Guest
Posts: n/a
|
Martin
It may be the case that the word object is coming and going so fast that i just dont see it, I may have to use some form of thread.sleep() to hold it open for a bit. I am getting everything accomplished except a visual on word, the letter is made and saved complete with passsed information, I just never see it. Thanks for your help I'll get back with you Samantha "Martin" <> wrote in message news:3fca690d$0$143$4all. nl... > Okay, here's another thought. > > You seem to start Word as a COM server by obtainig an interface. Then you > talk to the interface and I presume the client side script runs out of scope > at some point. That would be the time for the script interpreter to release > the interface if you had not done so yourself by setting your WrdApp to > Nothing. Word would notice there are no COM clients left and would > terminate. The whole thing could be going so fast that you would never see > the Word GUI. > > If this is indeed what is happening, it would help to just start Word before > the firt interface is obtained through > > WrdApp = New Word.ApplicationClass > > > Does it work the way you want it to if Word is already up before the script > kicks in? If so, you need to have the script start a Word instance if it not > already there. I don't want to start thinking about how to do that yet. > > Better yet would be to have some sort of client side session object to store > your WrdApp in , preventing it from running out of scope. > > I hope this makes any sense. > > Martin. > > > "Elizabeth Harmon" <> wrote in message > news:... > > Martin > > > > Thanks for your help. > > > > I am passing back information From the Server to a web page, and then > > Opening Word on the Client side and then filling bookmarks on the Word > > Template that is located on the Client in an intranet website, with the > code > > below: > > > > ************************************************** *************** > > If WrdApp Is Nothing Then > > WrdApp = New Word.ApplicationClass > > > > WrdApp.Visible = True > > > > WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize > > > > End If > > > > wrdLetter = New Word.Document > > > > Dim strNewFilePath As String = "C:\Temp\" > > > > Dim strUniqId As String = Date.Now.Hour.ToString() & > > Date.Now.Minute.ToString() > > > > Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() & > > CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") & > > strUniqId.Replace(":", "-") & ".doc" > > > > Dim missing As Object > > > > missing = System.Reflection.Missing.Value > > > > wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True, > > missing, missing, missing, missing, missing, missing, missing, isVisible, > > missing, missing) > > > > wrdLetter.Activate() > > > > wrdLetter.Bookmarks.Item("TodayDate").Range.Text = > > FormatDateTime(Date.Now(), DateFormat.ShortDate) > > > > wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName > > > > wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN > > > > wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval > > > > wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName > > > > wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName > > > > wrdLetter.SaveAs(strNewFilePath & NewFileName) > > > > wrdLetter.PrintPreview() > > > > 'WrdApp_DocumentBeforeClose(wrdLetter, False) > > > > > ************************************************** ************************** > > ***** > > > > I can send the information, the word doc file gets its bookmarks filled > and > > it is saved on the local client, the only thing missing is the GUI of Word > > which never appears to become visible even though i issue a Visible = true > > propety of the Word App. > > > > What i want is for the User to see the document so they can review it or > > make any changes to the document. I have disabled the interactive user for > > an indentity that has full rights to the Client machine, i just dont > > understand why the Visible property is not being understood. > > > > Thanks in advance > > Samantha > > > > "Martin" <> wrote in message > > news:3fca5209$0$123$4all. nl... > > > > The client side script code should be executed under your > > > > visitor's account, the one that started the browser, which is the > > > > interactive user on the client side. I don't see an identity issue > > there. > > > > > > This had better not be true since it would enable a web site developer > > > to erase the visitor's local hard disk using client side script. I am > not > > > too confident in this area. Anyway, check out that Visible > > > property. > > > > > > Martin. > > > > > > > > > > > > |
|
|
|
|
|||
|
|||
| Elizabeth Harmon |
|
Elizabeth Harmon
Guest
Posts: n/a
|
Changing the COM User to The Interactive User Worked and the Word app
appeared like i needed so thanks for all your help Samantha "Elizabeth Harmon" <> wrote in message news:%23k$... > Martin > > It may be the case that the word object is coming and going so fast that i > just dont see it, I may have to use some form of thread.sleep() to hold it > open for a bit. I am getting everything accomplished except a visual on > word, the letter is made and saved complete with passsed information, I just > never see it. > > Thanks for your help > > I'll get back with you > Samantha > > > "Martin" <> wrote in message > news:3fca690d$0$143$4all. nl... > > Okay, here's another thought. > > > > You seem to start Word as a COM server by obtainig an interface. Then you > > talk to the interface and I presume the client side script runs out of > scope > > at some point. That would be the time for the script interpreter to > release > > the interface if you had not done so yourself by setting your WrdApp to > > Nothing. Word would notice there are no COM clients left and would > > terminate. The whole thing could be going so fast that you would never see > > the Word GUI. > > > > If this is indeed what is happening, it would help to just start Word > before > > the firt interface is obtained through > > > > WrdApp = New Word.ApplicationClass > > > > > > Does it work the way you want it to if Word is already up before the > script > > kicks in? If so, you need to have the script start a Word instance if it > not > > already there. I don't want to start thinking about how to do that yet. > > > > Better yet would be to have some sort of client side session object to > store > > your WrdApp in , preventing it from running out of scope. > > > > I hope this makes any sense. > > > > Martin. > > > > > > "Elizabeth Harmon" <> wrote in message > > news:... > > > Martin > > > > > > Thanks for your help. > > > > > > I am passing back information From the Server to a web page, and then > > > Opening Word on the Client side and then filling bookmarks on the Word > > > Template that is located on the Client in an intranet website, with the > > code > > > below: > > > > > > ************************************************** *************** > > > If WrdApp Is Nothing Then > > > WrdApp = New Word.ApplicationClass > > > > > > WrdApp.Visible = True > > > > > > WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize > > > > > > End If > > > > > > wrdLetter = New Word.Document > > > > > > Dim strNewFilePath As String = "C:\Temp\" > > > > > > Dim strUniqId As String = Date.Now.Hour.ToString() & > > > Date.Now.Minute.ToString() > > > > > > Dim NewFileName As String = strPatientName.Replace(" ", "-").ToString() > & > > > CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") & > > > strUniqId.Replace(":", "-") & ".doc" > > > > > > Dim missing As Object > > > > > > missing = System.Reflection.Missing.Value > > > > > > wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, True, > > > missing, missing, missing, missing, missing, missing, missing, > isVisible, > > > missing, missing) > > > > > > wrdLetter.Activate() > > > > > > wrdLetter.Bookmarks.Item("TodayDate").Range.Text = > > > FormatDateTime(Date.Now(), DateFormat.ShortDate) > > > > > > wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName > > > > > > wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN > > > > > > wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval > > > > > > wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName > > > > > > wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName > > > > > > wrdLetter.SaveAs(strNewFilePath & NewFileName) > > > > > > wrdLetter.PrintPreview() > > > > > > 'WrdApp_DocumentBeforeClose(wrdLetter, False) > > > > > > > > > ************************************************** ************************** > > > ***** > > > > > > I can send the information, the word doc file gets its bookmarks filled > > and > > > it is saved on the local client, the only thing missing is the GUI of > Word > > > which never appears to become visible even though i issue a Visible = > true > > > propety of the Word App. > > > > > > What i want is for the User to see the document so they can review it or > > > make any changes to the document. I have disabled the interactive user > for > > > an indentity that has full rights to the Client machine, i just dont > > > understand why the Visible property is not being understood. > > > > > > Thanks in advance > > > Samantha > > > > > > "Martin" <> wrote in message > > > news:3fca5209$0$123$4all. nl... > > > > > The client side script code should be executed under your > > > > > visitor's account, the one that started the browser, which is the > > > > > interactive user on the client side. I don't see an identity issue > > > there. > > > > > > > > This had better not be true since it would enable a web site developer > > > > to erase the visitor's local hard disk using client side script. I am > > not > > > > too confident in this area. Anyway, check out that Visible > > > > property. > > > > > > > > Martin. > > > > > > > > > > > > > > > > > > > > |
|
|
|
|
|||
|
|||
| Elizabeth Harmon |
|
Martin
Guest
Posts: n/a
|
Samantha,
> Changing the COM User to The Interactive User worked Groovy. Note that if you need to configure this for several workstations you can do so automatically by changing the registry according to the following import file: --------------------------------------- Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\AppID\{00020906-0000-0000-C000-000000000046}] @="Microsoft Word Document" "AuthenticationLevel"=dword:00000000 "RunAs"="Interactive User" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{0002090 6-0000-0000-C000-00000000 0046}] @="Microsoft Word Document" "AuthenticationLevel"=dword:00000000 "RunAs"="Interactive User" --------------------------------------- I assume the GUID will be identical for different Word versions but you may want to verify that (I copied it from the DCOMCNFG's property window's General tab and did a search for it in the registry). Launching user is default, if you change it in the GUI and hit F5 in RegEdit you will see the new setting appear. Martin. "Elizabeth Harmon" <> wrote in message news:... > Changing the COM User to The Interactive User Worked and the Word app > appeared like i needed so thanks for all your help > > Samantha > "Elizabeth Harmon" <> wrote in message > news:%23k$... > > Martin > > > > It may be the case that the word object is coming and going so fast that i > > just dont see it, I may have to use some form of thread.sleep() to hold it > > open for a bit. I am getting everything accomplished except a visual on > > word, the letter is made and saved complete with passsed information, I > just > > never see it. > > > > Thanks for your help > > > > I'll get back with you > > Samantha > > > > > > "Martin" <> wrote in message > > news:3fca690d$0$143$4all. nl... > > > Okay, here's another thought. > > > > > > You seem to start Word as a COM server by obtainig an interface. Then > you > > > talk to the interface and I presume the client side script runs out of > > scope > > > at some point. That would be the time for the script interpreter to > > release > > > the interface if you had not done so yourself by setting your WrdApp to > > > Nothing. Word would notice there are no COM clients left and would > > > terminate. The whole thing could be going so fast that you would never > see > > > the Word GUI. > > > > > > If this is indeed what is happening, it would help to just start Word > > before > > > the firt interface is obtained through > > > > > > WrdApp = New Word.ApplicationClass > > > > > > > > > Does it work the way you want it to if Word is already up before the > > script > > > kicks in? If so, you need to have the script start a Word instance if it > > not > > > already there. I don't want to start thinking about how to do that yet. > > > > > > Better yet would be to have some sort of client side session object to > > store > > > your WrdApp in , preventing it from running out of scope. > > > > > > I hope this makes any sense. > > > > > > Martin. > > > > > > > > > "Elizabeth Harmon" <> wrote in message > > > news:... > > > > Martin > > > > > > > > Thanks for your help. > > > > > > > > I am passing back information From the Server to a web page, and then > > > > Opening Word on the Client side and then filling bookmarks on the Word > > > > Template that is located on the Client in an intranet website, with > the > > > code > > > > below: > > > > > > > > ************************************************** *************** > > > > If WrdApp Is Nothing Then > > > > WrdApp = New Word.ApplicationClass > > > > > > > > WrdApp.Visible = True > > > > > > > > WrdApp.WindowState=Word.WdWindowState.wdWindowStat eMaximize > > > > > > > > End If > > > > > > > > wrdLetter = New Word.Document > > > > > > > > Dim strNewFilePath As String = "C:\Temp\" > > > > > > > > Dim strUniqId As String = Date.Now.Hour.ToString() & > > > > Date.Now.Minute.ToString() > > > > > > > > Dim NewFileName As String = strPatientName.Replace(" ", > "-").ToString() > > & > > > > CStr(FormatDateTime(Date.Now, DateFormat.ShortDate)).Replace("/", "-") > & > > > > strUniqId.Replace(":", "-") & ".doc" > > > > > > > > Dim missing As Object > > > > > > > > missing = System.Reflection.Missing.Value > > > > > > > > wrdLetter = WrdApp.Documents.Open(fileName, missing, readonlyAcc, > True, > > > > missing, missing, missing, missing, missing, missing, missing, > > isVisible, > > > > missing, missing) > > > > > > > > wrdLetter.Activate() > > > > > > > > wrdLetter.Bookmarks.Item("TodayDate").Range.Text = > > > > FormatDateTime(Date.Now(), DateFormat.ShortDate) > > > > > > > > wrdLetter.Bookmarks.Item("PatientNM").Range.Text = strPatientName > > > > > > > > wrdLetter.Bookmarks.Item("SSN").Range.Text = strPatientSSN > > > > > > > > wrdLetter.Bookmarks.Item("PCP").Range.Text = strEval > > > > > > > > wrdLetter.Bookmarks.Item("Location").Range.Text = strLocationName > > > > > > > > wrdLetter.Bookmarks.Item("TeacherNM").Range.Text = strTeacherName > > > > > > > > wrdLetter.SaveAs(strNewFilePath & NewFileName) > > > > > > > > wrdLetter.PrintPreview() > > > > > > > > 'WrdApp_DocumentBeforeClose(wrdLetter, False) > > > > > > > > > > > > > > ************************************************** ************************** > > > > ***** > > > > > > > > I can send the information, the word doc file gets its bookmarks > filled > > > and > > > > it is saved on the local client, the only thing missing is the GUI of > > Word > > > > which never appears to become visible even though i issue a Visible = > > true > > > > propety of the Word App. > > > > > > > > What i want is for the User to see the document so they can review it > or > > > > make any changes to the document. I have disabled the interactive user > > for > > > > an indentity that has full rights to the Client machine, i just dont > > > > understand why the Visible property is not being understood. > > > > > > > > Thanks in advance > > > > Samantha > > > > > > > > "Martin" <> wrote in message > > > > news:3fca5209$0$123$4all. nl... > > > > > > The client side script code should be executed under your > > > > > > visitor's account, the one that started the browser, which is the > > > > > > interactive user on the client side. I don't see an identity issue > > > > there. > > > > > > > > > > This had better not be true since it would enable a web site > developer > > > > > to erase the visitor's local hard disk using client side script. I > am > > > not > > > > > too confident in this area. Anyway, check out that Visible > > > > > property. > > > > > > > > > > Martin. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
|
|
|||
|
|||
| Martin |
|
|
|
| |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Help Help Pentax S5i Help needed (Please) | The Martian | Digital Photography | 14 | 06-20-2008 07:56 AM |
| HELP - HELP - HELP | =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?= | ASP .Net | 4 | 03-09-2006 12:46 PM |
| HELP WANTED HELP WANTED HELP WANTED | Harvey | ASP .Net | 1 | 07-16-2004 01:12 PM |
| HELP WANTED HELP WANTED HELP WANTED | Harvey | ASP .Net | 0 | 07-16-2004 10:00 AM |
| HELP! HELP! HELP! Opening Web Application Project Error | =?Utf-8?B?dHJlbGxvdzQyMg==?= | ASP .Net | 0 | 02-20-2004 05:16 PM |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc..
SEO by vBSEO ©2010, Crawlability, Inc. |




