473,721 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Issue in the VBA macro of MS word.

1 New Member
Greetings to all,

I am new to VB. In my VBA macro I am trying to access a data source(a text file) using the below code snippet.


Dim TESTING As String

..
..


TESTING = "M_1111"

Selection.TypeT ext Text:=vbCrLf & "TESTING" & _
vbCrLf & .DataFields(TES TING) & vbCrLf & _
"END OF TESTING" & vbCrLf



When I run the code, I am able to get the value of M_1111 from the data source(which is a text file) . But the problem is that, if the value of M_1111 has more number of characters(more than around 200 characters), the value gets truncated.


I don't know why this truncation is happening. Is there any maximum for the number of characters that can be accessed?

Any help appreciated.

Thanks
priby
Feb 12 '08 #1
0 853

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1377
by: Colin Steadman | last post by:
Apoligies if this post appears twice, but my first attempt at posting it was hours ago and there is still no sign of it in the forum (says five minutes in the confirmation message). ============================================================================= I have some sample code from Microsoft that allows me to start a specific Word template at the click of a button from within an ASP page. I would like to modify this in such a...
4
6162
by: mvivar | last post by:
Hi everybody: This will be not easy to explain as my mother language is not english, so my apologies in advance if it sounds confusing. We have a database access 97 wich controls time of people in their job in order to finally know how many money costs us to run some projects. People always estimates the time when reporting and we do have the impression they really underestimate the time.
10
2457
by: Brian Kwan | last post by:
Requirement: Call a Word Macro from ASP.NET with parameters Do anyone have idea about this? Please notice the import statement and sample code, as I am a beginner using ASP.NET, thanks for your kindly reply!
3
3854
by: Martin Austin | last post by:
Here's my problem. I'm launching an MS Word object on a Notes document Postopen event. The script kicks off a macro that saves the Word document to a temporary file every n minutes (backup of key data). This works fine apart from Notes kind of hangs because it is waiting on the macro to finish. This never happens because the macro is using timer code to save every n minutes. The solution sounds simple, start the macro on the Word...
5
5334
by: Mason | last post by:
I'm having some problems converting VBA for Word 2000 to code that VB.Net understands. I recorded a macro in Word to add numbering (a. b. c.) to my paragraphs. I managed to translate quite a bit of it, but I'm having trouble with two pieces: ListGalleries - I can't find any way to make VB.Net understand this. When I do a mouseover, the error message it gives is, "Interface 'Word.ListGalleries' cannot be indexed because it has no...
0
1442
by: hinew | last post by:
Hi. I have created macro for Microsoft word. However I need this to be run in visual baisc application. I need a program that ask user to select the word document which need to be processed. And after selecting the document and by clicking 'proceed', the program will automatically open the word document up and procede the macro. Can anyone help me please?
0
1147
by: Simon | last post by:
I'm using the following to open and run a macro in word wordApp.Documents.Open(MyDoc) wordApp.Run("CatgTitle") wordApp.save() The Macro goes through each item in Column A and based on the properties adjusts row hight, column width, font etc. also merges columns this takes 40 mins for 4000 rows
5
3486
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record the cursor was on in the datasheet at the time I executed the macro. So, the questions are: 1) In the macro, how to I get my hands on the record key or record data of the record the cursor was on in the datasheet at the time I executed the...
3
2794
by: vkagrawal | last post by:
Hi I have made a macro in ms word. Corresspondning this macro a form is associated, and on RUN of this macro operation is performed. Now i need to make this macro available as a tool in ms word for any number of files, such that when i install this macro and associated form in any machine, i should be able to do operation. How can i make a macro available as TOOL. Please provide any solution.
0
1322
by: A1000ma | last post by:
I am trying to develop a C# program to fill in the blanks in a Word Form. Everything works beautifully while the program is running. I had to go in to fix some links on our Web Site a couple of days later and found any Word Document containing links now shows the code instead of the link. i.e. {HYPERLINK "Executive%20Summary%20for%20CSI.doc"} instead of CSI. I have traced this error down to my program but don't know what is causing it. ...
0
8840
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9064
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8007
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3189
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.