Home > Archive > Visual Basic > September 2004 > Word 2000 and VB.NET
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Word 2000 and VB.NET
|
|
| Marcus Roden 2004-09-24, 3:55 pm |
| 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
| |
| Bob Butler 2004-09-24, 3:55 pm |
| "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>
| |
| Marcus Roden 2004-09-24, 3:55 pm |
| What'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>
>
| |
| Bob Butler 2004-09-24, 3:55 pm |
| "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.
| |
| Rick Rothstein 2004-09-24, 3:55 pm |
| > 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
| |
| alpine 2004-09-24, 3:55 pm |
| You 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:
[color=darkred]
>What's Visual Basic .Net if it's not Visual Basic!!!
>
>"Bob Butler" wrote:
>
| |
| Paul Clement 2004-09-28, 8:55 am |
| On Fri, 24 Sep 2004 08:13:04 -0700, Marcus Roden <MarcusRoden@discussions.microsoft.com> wrote:
¤ 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!!!
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 Visible property of the
Application object to True.
WordApp.Visible = True
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
| |
| Paul Clement 2004-09-28, 8:55 am |
| On Fri, 24 Sep 2004 12:32:57 -0400, "Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.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)
| |
| Rick Rothstein 2004-09-28, 3:55 pm |
| > > 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
| |
| Rick Rothstein 2004-09-28, 3:55 pm |
| > ¤ > 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
| |
| Paul Clement 2004-09-28, 3:55 pm |
| On Tue, 28 Sep 2004 09:06:44 -0400, "Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> wrote:
¤ > > 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)...
The statement isn't misleading because my reply refers to a specific question which is directly
applicable to both versions. Any syntactical differences in this instance aren't relevant to the
Word automation mechanism. If you feel the technical response I offered was misleading please
identify why it isn't related.
In any event, your implication that "well-meaning" Classic VB developers have no knowledge of VB.NET
is incorrect. The poster is not better served if he/she is redirected to another newsgroup when
there is a high possibility that the question can be answered here.
¤
¤ > > 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.
¤
¤ 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
I have to say that I really find the continuing attitude concerning VB.NET questions here rather
disappointing, but I guess not surprising.
Rather than actually reading the question in order to determine whether there is a suitable
solution, the immediate response is to redirect them to another newsgroup. This thread is a perfect
example as it isn't really even a Visual Basic specific question - it's a Word automation issue. I
certainly didn't see anyone suggest the question be posted to one of the Word VBA newsgroups.
Even worse is the denial that the solution to a problem can be the same in both Classic Visual Basic
and VB.NET. Some of you may have convinced yourselves that there is no possible way that this could
be the case but frankly that isn't my problem, and there's no point debating it with those who
aren't interested in VB.NET. I continue to develop solutions in both whether they be independent
from one another or integrated through interoperability. I'm not about to draw a line in the sand
with respect to each version and those technical questions which relate to each version unless the
solutions are distinctly different.
If the question is specific to VB.NET then it's appropriate to send them to the VB.NET newsgroups.
However, my first priority is to determine whether the question can be answered and not respond in a
way which indicates that it is instead "defending my turf".
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
| |
| Bob O`Bob 2004-09-29, 3:55 am |
| Paul Clement wrote:
> Rather than actually reading the question in order to determine whether there is a suitable
> solution, the immediate response is to redirect them to another newsgroup. This thread is a perfect
> example as it isn't really even a Visual Basic specific question - it's a Word automation issue.
either way, it's off topic for THIS newsgroup. Get Over It.
Bob
--
| |
| Paul Clement 2004-09-29, 3:55 pm |
| On Tue, 28 Sep 2004 20:06:53 -0700, Bob O`Bob <filterbob@yahoogroups.com> wrote:
¤ Paul Clement wrote:
¤
¤ > Rather than actually reading the question in order to determine whether there is a suitable
¤ > solution, the immediate response is to redirect them to another newsgroup. This thread is a perfect
¤ > example as it isn't really even a Visual Basic specific question - it's a Word automation issue.
¤
¤ either way, it's off topic for THIS newsgroup. Get Over It.
¤
That's your problem not mine.
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
| |
| Al Reid 2004-09-29, 3:55 pm |
| "Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message news:afgll01vu3k0ojiu4s7hickd3aebe2ii3d@
4ax.com...
> On Tue, 28 Sep 2004 20:06:53 -0700, Bob O`Bob <filterbob@yahoogroups.com> wrote:
>
> ¤ Paul Clement wrote:
> ¤
> ¤ > Rather than actually reading the question in order to determine whether there is a suitable
> ¤ > solution, the immediate response is to redirect them to another newsgroup. This thread is a perfect
> ¤ > example as it isn't really even a Visual Basic specific question - it's a Word automation issue.
> ¤
> ¤ either way, it's off topic for THIS newsgroup. Get Over It.
> ¤
>
> That's your problem not mine.
>
>
> Paul ~~~ pclement@ameritech.net
> Microsoft MVP (Visual Basic)
Paul,
I actually see it as your problem for continuing to promote and contribute to the decline of the signal-to-noise ratio in this
group. Rather than continue to inject your nonsense about .Net in this group, why not jus hang out in the .Net groups and leave us
to handle the VB Classic questions.
In the long run, more posters will get timely and accurate replies to their questions.
--
Al Reid
How will I know when I get there...
If I don't know where I'm going?
| |
| Paul Clement 2004-09-29, 3:55 pm |
| On Wed, 29 Sep 2004 10:18:52 -0400, "Al Reid" <areidjr@reidDASHhome.com> wrote:
¤ "Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message news:afgll01vu3k0ojiu4s7hickd3aebe2ii3d@
4ax.com...
¤ > On Tue, 28 Sep 2004 20:06:53 -0700, Bob O`Bob <filterbob@yahoogroups.com> wrote:
¤ >
¤ > ¤ Paul Clement wrote:
¤ > ¤
¤ > ¤ > Rather than actually reading the question in order to determine whether there is a suitable
¤ > ¤ > solution, the immediate response is to redirect them to another newsgroup. This thread is a perfect
¤ > ¤ > example as it isn't really even a Visual Basic specific question - it's a Word automation issue.
¤ > ¤
¤ > ¤ either way, it's off topic for THIS newsgroup. Get Over It.
¤ > ¤
¤ >
¤ > That's your problem not mine.
¤ >
¤ >
¤ > Paul ~~~ pclement@ameritech.net
¤ > Microsoft MVP (Visual Basic)
¤
¤ Paul,
¤
¤ I actually see it as your problem for continuing to promote and contribute to the decline of the signal-to-noise ratio in this
¤ group. Rather than continue to inject your nonsense about .Net in this group, why not jus hang out in the .Net groups and leave us
¤ to handle the VB Classic questions.
¤
Because I work with and support both versions, Al. That was rather clear in my post. If "noise" and
"nonsense" is a concern then lets move on.
¤ In the long run, more posters will get timely and accurate replies to their questions.
They already do.
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
|
|
|
|
|