Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 26th, 2003, 01:46 AM
Registered User
Join Date: Nov 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing word document from VB

Hi All,

Currently i am using word application to generate a report from vb. VB application creates a new document and writes the content into the word document. While writing if the database value contain a new line character,the word format is not proper. Instead of a new line character word application displays some ascii characters. How to write new line character into word from vb. I am using Word 2000. It is working fine in word 97.

Has anybody done anything like this. Any help is greatly appreciated.

Many thanks in advance

Old December 27th, 2003, 02:24 AM
Registered User
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

have you tried sending a vbCr or vbCrLf? Cr =Carriage Return Lf=Line Feed
Old January 19th, 2004, 04:12 PM
Registered User
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

I, too am trying to put text into a word (2000) document from VB6.

I cannot get the Typetext Text:= & membvar to work.

TypeText doesn't recognize the Text:= param, let alone the memory variable. I can do anything on the Word menu system (FileOpen, etc...)
But I can't get text to type. What's up with that????



Gary Chappelear
Old January 20th, 2004, 05:20 AM
Authorized User
Join Date: Jun 2003
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts

I used bookmarks as placeholders to write text to a word document. We use template documents (contracts) and we have to fill out various parts of it such as dates customer names and a table containing product and cost data. Maybe you could look at bookmarks if thats any help.

Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing elements using document() function geoGregory3 XSLT 2 February 28th, 2008 07:39 PM
Reading a MS Word Document using VB.net pauljohns353 VB How-To 0 November 14th, 2006 06:26 AM
Opening word document read only in VB StevenVints VB How-To 1 May 3rd, 2006 09:52 AM
formatting of a word document with vb.net krmilburn General .NET 0 April 18th, 2006 06:47 AM
Reading MS WORD Document by VB.Net ocarroll General .NET 0 March 31st, 2006 02:17 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.