Code Comments
Programming Forum and web based access to our favorite programming groups.I am currently writing a database application in VB .NET 2003 which requires
some of the data inputted into it to be exported to Word 2000, on the
development machine it has Word 2003 installed.
The problem is when my application starts up it loads multiple instances of
Word in the background without showing anything on the screen it only shows
up in the Windows Task Manager. The following is a sample of my code:
Dim WordApp As Object
Dim WordDoc As Object
Dim strPath As String = Application.StartupPath & "\Documents\Document.doc"
WordApp = CreateObject("Word.Application")
WordDoc = WordApp.Documents.Open(strPath)
Sorry if the code seems a bit old fashioned but it's the best to my ability!
!!
--
Marcus
Post Follow-up to this message"Marcus Roden" <MarcusRoden@discussions.microsoft.com> wrote in message news:EA18E342-EA7B-418E-B67D-83D53BA5BBB7@microsoft.com > I am currently writing a database application in VB .NET 2003 which > requires some of the data inputted into it to be exported to Word > 2000, on the development machine it has Word 2003 installed. -- <response type="generic" language="VB.Net"> This newsgroup is for users of Visual Basic and whatever VB.Net is, Visual Basic it isn't. Solutions appropriate to one will be meaningless in the other and you are more likely to get the answers you need in newsgroups that are frequented by others using the dotnet platform rather than here where the focus is on VB "classic" . Look for newsgroups with the words "dotnet" or "vsnet" in their name. For the msnews.microsoft.com news server, try these: microsoft.public.dotnet.general microsoft.public.dotnet.languages.vb </response>
Post Follow-up to this messageWhat's Visual Basic .Net if it's not Visual Basic!!! "Bob Butler" wrote: > "Marcus Roden" <MarcusRoden@discussions.microsoft.com> wrote in message > news:EA18E342-EA7B-418E-B67D-83D53BA5BBB7@microsoft.com > > > -- > <response type="generic" language="VB.Net"> > This newsgroup is for users of Visual Basic and whatever > VB.Net is, Visual Basic it isn't. Solutions appropriate to > one will be meaningless in the other and you are more likely > to get the answers you need in newsgroups that are > frequented by others using the dotnet platform rather than > here where the focus is on VB "classic" . Look for > newsgroups with the words "dotnet" or "vsnet" in their name. > > For the msnews.microsoft.com news server, try these: > > microsoft.public.dotnet.general > microsoft.public.dotnet.languages.vb > > </response> >
Post Follow-up to this message"Marcus Roden" <MarcusRoden@discussions.microsoft.com> wrote in message news:E580CD8B-CCCB-4232-90E4-24200F454A79@microsoft.com > What's Visual Basic .Net if it's not Visual Basic!!! That's the question we've been trying to answer since it was released. Calling it Visual Basic when it is not the same syntax as earlier versions is, at the very least, deceptive. Any answer you get for either language is going to be unusable in the other so they are not the same thing. This newsgroup is devoted to VB6 and earlier and there are new newgroups for the dotnet languages. The fact that a poor choice of names has result in much confusion is the fault of MS and neither set of newgroups will benefit from mixing discussions of the two languages.
Post Follow-up to this message> What's Visual Basic .Net if it's not Visual Basic!!! It's a different Visual Basic language from the Visual Basics with version numbers 1 thru 6. Trust me when I say that you do not want to try and use code suggestions from one of these earlier (original) Visual Basic languages on any of your VB.NET programs (the languages are that different). You will be doing yourself a big favor if you confine your VB.NET questions to the newsgroups suggested to you by Bob. Rick - MVP
Post Follow-up to this messageYou have been misled. The fact is that VB.NET <> VB. HTH, Bryan ________________________________________ ____________________ New Vision Software "When the going gets weird," Bryan Stafford "the weird turn pro." alpine_don'tsendspam@mvps.org Hunter S. Thompson - Microsoft MVP-Visual Basic Fear and Loathing in LasVegas On Fri, 24 Sep 2004 09:02:43 -0700, Marcus Roden <MarcusRoden@discussions.microsoft.com> wrote: >What's Visual Basic .Net if it's not Visual Basic!!! > >"Bob Butler" wrote: >
Post Follow-up to this messageOn Fri, 24 Sep 2004 08:13:04 -0700, Marcus Roden <MarcusRoden@discussions.mi
crosoft.com> wrote:
¤ I am currently writing a database application in VB .NET 2003 which requir
es
¤ some of the data inputted into it to be exported to Word 2000, on the
¤ development machine it has Word 2003 installed.
¤
¤ The problem is when my application starts up it loads multiple instances o
f
¤ Word in the background without showing anything on the screen it only show
s
¤ up in the Windows Task Manager. The following is a sample of my code:
¤
¤ Dim WordApp As Object
¤ Dim WordDoc As Object
¤
¤ Dim strPath As String = Application.StartupPath & "\Documents\Document.doc
"
¤
¤ WordApp = CreateObject("Word.Application")
¤ WordDoc = WordApp.Documents.Open(strPath)
¤
¤
¤ Sorry if the code seems a bit old fashioned but it's the best to my abilit
y!!!
Actually the solution is the same regardless of what version of Visual Basic
you are using. Anyone
who has written code using Word automation would know this.
If you want the Word user interface to display then you need to set the Visi
ble property of the
Application object to True.
WordApp.Visible = True
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
Post Follow-up to this messageOn Fri, 24 Sep 2004 12:32:57 -0400, "Rick Rothstein" <rickNOSPAMnews@NOSPAMc omcast.net> wrote: ¤ > What's Visual Basic .Net if it's not Visual Basic!!! ¤ ¤ It's a different Visual Basic language from the Visual Basics with ¤ version numbers 1 thru 6. Trust me when I say that you do not want to ¤ try and use code suggestions from one of these earlier (original) Visual ¤ Basic languages on any of your VB.NET programs (the languages are that ¤ different). You will be doing yourself a big favor if you confine your ¤ VB.NET questions to the newsgroups suggested to you by Bob. ¤ ¤ Rick - MVP You guys are hilarious. ;-) Paul ~~~ pclement@ameritech.net Microsoft MVP (Visual Basic)
Post Follow-up to this message> > Dim strPath As String = Application.StartupPath & "\Documents\Document.doc" > > Actually the solution is the same regardless of what version > of Visual Basic you are using. Anyone who has written code > using Word automation would know this. Your statement above is misleading and unfair to the original poster in that it leaves him with the impression that his .NET questions have a good shot of getting properly answered in this newsgroup. If this question was not identified as a .NET question, or if I didn't know .NET was different from VB-Classic, my comment to the OP would be that the above quoted statement was not proper VB syntax. Besides the fact that VB6 (and earlier) does not allow you to concatenate and assign strings during variable declaration, there is also the problem of misspelling the App object as Application and using the improper property StartupPath instead of Path. Yes, for THIS question, the ultimate answer would be the same; however, the OP would be better served asking his questions in a newsgroup where .NET programmers hang out. One, there will be a larger pool of responders from which he can get a proper answer to his questions; two, he won't have to suffer what would be misleading "help" (such as above) from well-meaning VB-Classic programmers; and three, his postings won't create what, to the newsgroup participants here, is nothing but noise. Let me repeat the OP's original question and my response to it (just to keep the archived record straight)... > > It's a different Visual Basic language from the Visual Basics > with version numbers 1 thru 6. Trust me when I say that you > do not want to try and use code suggestions from one of > these earlier (original) Visual Basic languages on any of your > VB.NET programs (the languages are that different). You will > be doing yourself a big favor if you confine your VB.NET > questions to the newsgroups suggested to you by Bob. And, again, for the archived record, let me repeat Bob Butler's response to the originally posted question... > <response type="generic" language="VB.Net"> > This newsgroup is for users of Visual Basic and whatever > VB.Net is, Visual Basic it isn't. Solutions appropriate to > one will be meaningless in the other and you are more likely > to get the answers you need in newsgroups that are > frequented by others using the dotnet platform rather than > here where the focus is on VB "classic" . Look for > newsgroups with the words "dotnet" or "vsnet" in their name. > > For the msnews.microsoft.com news server, try these: > > microsoft.public.dotnet.general > microsoft.public.dotnet.languages.vb > </response> Rick - MVP
Post Follow-up to this message> ¤ > What's Visual Basic .Net if it's not Visual Basic!!! > ¤ > ¤ It's a different Visual Basic language from the Visual Basics with > ¤ version numbers 1 thru 6. Trust me when I say that you do not want to > ¤ try and use code suggestions from one of these earlier (original) Visual > ¤ Basic languages on any of your VB.NET programs (the languages are that > ¤ different). You will be doing yourself a big favor if you confine your > ¤ VB.NET questions to the newsgroups suggested to you by Bob. > ¤ > ¤ Rick - MVP > > You guys are hilarious. ;-) Why do you say that? (You might want to see my response to your other posting before answering.) Rick - MVP
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.