Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

stuff text into MS Word from VB

Posted on 2002-05-02
2
Medium Priority
?
132 Views
Last Modified: 2010-08-05
I'm reasonably conversant w/ VB and VBA but I can't figure out how to do what I believe should be a simple operation which is to take a bunch of text (call it a long string) and stuff it into MS Word (opening an instantiation of Word as part of the process). I can worry about formatting & stuff later, if someone can just push on my chest to get me breathing.

Thanks for your time.
0
Comment
Question by:HobbitHouse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
nzjonboy earned 200 total points
ID: 6987195
check out this basic tutorial

http://www.vbsquare.com/beginning/begword/

nzjonboy
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6987285
reference microsoft word object library:

Dim wdApp As New Word.Application
Dim wdDoc As Word.Document

Set wdDoc = wdApp.Documents.Add
wdDoc.Content.InsertBefore "WRITE THIS TO THE NEW DOCUMENT"
wdDoc.SaveAs "C:\windows\desktop\testDoc.doc"

wdDoc.Close
Set wdDoc = Nothing
wdApp.Quit
Set wdApp = Nothing
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question