473,414 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Copying text in text boxes into Microsoft Word

Hi, atm i have a peice of code that will open microsoft word, and then copy text that it inside two speech marks. But instead of copying the text from the speech marks, i want to change the code to copy text from text boxes and put it into Microsoft Word instead.

Expand|Select|Wrap|Line Numbers
  1.  private void BtnAutomateWord_Click(object sender, EventArgs e)
  2.         {
  3.             Word.Application objWord = new Word.Application();
  4.             objWord.Visible = true;
  5.             Word.Document objDoc;
  6.             object objMissing = System.Reflection.Missing.Value;
  7.             objDoc = objWord.Documents.Add (ref objMissing, ref objMissing, ref objMissing, ref objMissing);
  8.             objWord.Selection.TypeText ("THIS WILL APEEAR IN WORD");
  9.             objWord = null;
  10.         }
Cheers
Matt
Mar 21 '10 #1
1 1692
jkmyoung
2,057 Expert 2GB
Is the text from the textbox not accessible through the textbox's .Text property?
Mar 22 '10 #2

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

Similar topics

6
by: Andy Jacobs | last post by:
Hi All I've written a little CMS with a WYSIWYG editor from www.interactivetools.com. Everything works ok until they try and copy text from MS Word. When they do this, apostrophes change to a...
3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
6
by: Tony Roost | last post by:
I have created a test VB.Net form that will use MS Word to check the spelling of text in an input box The test application runs without a problem and I quit the word application at the end of the...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
16
by: DataBard007 | last post by:
I have an Access97 application whose form contains many text boxes. What do I have to do in order to copy the contents of one of these text boxes to the clipboard? I want to do this so I can then...
5
by: RC | last post by:
I have a form with three text boxes on it. I want the third text box to show the total of the values in the other two text boxes. The first box is named: BoxOne and I type the number 2 into it...
5
by: paii, Ron | last post by:
Is there a setting to not word wrap text on a unbound text box. in A97?
6
by: cbmeeks | last post by:
Any WYSIWYG text box controls out there for NON-HTML, NON-WEB text boxes? One that stores the text in XML format would be cool. Thanks cbmeeks
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
11
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.