How To Get Onlthe First Word In A Text ?

Oct 27, 2007

Hi,
Can some1 tel me how to get only the first word in a text field where there are many words? The text field has many words but I need only the first (the first before the first space)

Thnx in adv.

View Replies


ADVERTISEMENT

Modules & VBA :: Moving Rich Text From Access Memo Field To A Word Text Box

Jul 24, 2015

We need to move rich text from an Access memo field to a Word text box. So far the best Ive been able to come up with is in the code below. In this code pprs!What is a record set field of a table memo field that is bound to a text box enabled for rich text. The rich text seems to be stored as html as so I can get word to convert it by enclosing it in html tags.

Dim What As Word.Shape
Set What = doc.Shapes.AddTextbox(msoTextOrientationHorizontal , doc.PageSetup.LeftMargin, 225, 534, 0)
Dim sPath As String
sPath = "G:Temp.html"
Open sPath For Output As 1
Print #1, "<HTML>" & pprs!What & " </HTML>"
Close #1
What.TextFrame.TextRange.InsertFile (sPath)

View 2 Replies View Related

Forms :: Change Text Color On A Form If Text In Field Contain Certain Word

Jul 12, 2013

I have a Form Display Data in my Access Database, which is working really well. However, users was asking if there is a way we can make Font Color Could/would change if The text in A field or Any field in my display form contained the word "SAD or MAD". Is there code for such thing in display form?..

View 3 Replies View Related

Text Box That Works Like Word?

Apr 18, 2006

Hi All,

I have a text box (memo field) that the user enters a description. This is sometimes more then one paragraph. In a text box you cant hit enter and goto the next line (or paragraph). I would like to to this? can it be done?

Thanks

View 1 Replies View Related

Text Box That Works Like Word?

Apr 18, 2006

Hi All,

I have a text box (memo field) that the user enters a description. This is sometimes more then one paragraph. In a text box you cant hit enter and goto the next line (or paragraph). I would like to to this? can it be done?

Thanks

View 5 Replies View Related

How To Read First Word From A Text Box

Jan 22, 2008

Hi,

I have 2 text boxes in a form. In first box a sentence is appearing and second text box is unbound.

In second text box, I need to read only first word of a sentence appeared in a first text box.

How can I do it?

Please advise.


With kind regards,

Ashfaque

View 14 Replies View Related

Rich Text Area To Word Doument.

Oct 16, 2006

Hi..

I am using RTF2 ActiveX Control which enables me to include the Rict Text Controls in my Access Form.

I want to generate a doc document out of the information which i type in the RTF2 Area on the Access Form. And whatever Rich Text Format information i have written there (for eg in Bold, Italics, Indentation, Tables created, Bullets n Numbering etc), is retained as it is on the Doc document which i am generating with the help of bookmarks.

Please help in how do i do that 'coz i am not able to do it using the Rich Text Format...

Thanking you,

with regards,
Kapil Sharma

View 3 Replies View Related

Convert Export As Text To Tab Delimited (Word Merge)

Aug 3, 2005

I had to delete a database so I exported selected records using export as a text file thinking I would get some sort of delimited text file that I could later use. Instead I got some sort of fixed length file with .............. between records and | between fields.

I'd like to convert this data to a tab delimited file.

How would I do this?

Thanks

View 12 Replies View Related

Forms :: Search Text Box For Specific Word - Find Option

Sep 18, 2013

I have 5 textboxes and a multiline textbox in a form in my Access Database. I am going to type several keywords in those textboxes and I am going to type an article in the multiline textbox.

What I need to do is I want to calculate the keyword density in the article. I can do that if i know how to search the whole text in the article and count the specific word. And I want a function to count all the words in the article too.

View 1 Replies View Related

Modules & VBA :: Quick Way To Export ALL VBA Code To A Text File / Word Document?

Aug 4, 2014

Is there a quick way to export ALL VBA code to a text file/word document?

View 5 Replies View Related

Modules & VBA :: Insert Rich Text (HTML Format) From Access To Word 2013

Jul 24, 2014

I'm about to connect my DB to word. So I made a form where the user has to choose what entry to export. The data is inserted in a word file in different bookmarks. But there is one special task to insert the rich text so in this case the html formatted text is displayed like this:

Code:
<html><div>asdf</div></html>

My Text is inserted like this:

Code:
wdApp.ActiveDocument.Bookmarks("-Bookmarkname-").Range.Text = Lrs("-ColumnName-")

Lrs is a Recordset.

So how is it possible to display the html code right in the Word doc?

View 1 Replies View Related

General :: Open Word Document With Corresponding Data Filled From Text Field Of A Form

Jul 10, 2013

I am trying to open a word document with corresponding data filled from the text field of a form. I managed to get the word document but I don't know how to give a variable in word document.

View 2 Replies View Related

How To Match 4 Character Word Or Number Or Combination By Identical 4 Characters Word

Apr 11, 2013

How to match 4 character word or number or combination by identical 4 characters word or number or combination in one word have 10 or 15 characters.

I have to two separate tables (Table A and Table B). Table A has one column (Tag No) and Table B has about 15 columns with one column name Tag No as below

Table A

Table B

Tag No

Tag No

2009

ZZZ-2030-DC

2010

ZZZ-2010-M9P

[code]....

They're both in MS Access.I am trying to match 2 tables - columns (Tag No) with join query, but not success. I want to match 4 characters in Table-A with 4 similar characters in Table-B (Tag No) cell.What query is suitable to compare two tables.

View 8 Replies View Related

Word :: Sizing MS Word Table To Same Size As Recordset

Aug 14, 2014

My end goal is to populate a pre-existing table in an MS Word document with records from a query. The easiest way I've found (through scouring the internet) is to start with the code below (ran during OnClick() even in Access) to get the table the same size as the recordset:

Code:
Dim wDoc As Word.Document
Dim wTable As Word.Table
Dim wCell As Word.Cell
Set wDoc = appWord.Documents.Add(strDocLoc)
wDoc.Visible = True

[Code] ....

The code will shrink the table down just fine if the table has more rows than the recordset +1 (for header column). My hangup with this is the last line ("Selection.InsertRowsBelow 5") isn't executing; rows are not being added to the table. I get no errors -- it just does nothing. I set it as "Selection.InsertRowsBelow 5" arbitrarily just to see if it would even add rows, and sure enough it's not.

View 9 Replies View Related

Word Help

May 18, 2005

Hi,

I am exporting a table to word and I have come across a problem.
My code opens a template, creates a table with the correct number of rows and columns at a certain position, and then adds data to it.
At this point, everything is fine. But, here is where the problem sticks its ugly head out. I am modifying the column widths and every other time I run it, it crashes, saying something about not being able to access the remote server. Run time error 462.
I have checked in the task manager that word is being quit properly each time and tried going to different templates.
The first time I run it, it runs fine. The second time, it crashes on the line where I change the width. Here is the line of code.

mytable.Columns(1).Width = InchesToPoints(1.2)

I have found that if I close the document after it is created and leave word open, it will run fine.
I think I am in the same boat as mrpauly. But his post date is 23rd April 2001…
http://www.access-programmers.co.uk/forums/showthread.php?t=26363

Has anyone else seen or heard anything like this? I’m really confused…
Thanks for any help anyone can give.

View 1 Replies View Related

VB And MS Word

Aug 15, 2007

Hello,
I made a database application and i need some help: in the application i use a script that modifies word documents by opening ms word application, but some customers don't want to install ms word. I'm asking if someone knows tto exist some kind of word runtime that i can modify word documents without having word installed. I'm using also vb6.


Thanks!!!!

View 1 Replies View Related

I Have A Template In Word

Jul 11, 2005

and I want to write in some places


I know to open the word
and write in to the word


to write in to word:

Dim objWord As Word.Application

Set objWord = CreateObject("Word.Application")
objWord.Visible = False 'True is visible
objWord.Documents.Add ("C:DocumentsTest.dot")
objWord.ActiveDocument.Bookmarks("bmCusDetails").Select
objWord.Selection.Text = Forms![a]![b]


objWord.Visible = True


but how am I write in a special place?

thanks alot, and sorry on my english

View 1 Replies View Related

Datasheet To Word

Jul 22, 2005

Exporting datasheet to word, how is this possible using vb. Actually, I do have a thread in Form forum. But, I think not a lot of people visit that place. Anyways, I have created bookmarked and used datavariable to export the data (by ansentry's help). But the only thing that it exports is just one selection on that datasheet, instead of all the chosen rows.

I am exhausted now after searching everywhere, and not finding a clue. How to resolve that situation. If there is an example that I can use, that would be gr8.

Thanks In Adv.

View 2 Replies View Related

Reports To Word

Mar 26, 2006

Right the thing is i can export my reports to word but when they export they don't hold the lines that i placed around the text boxes, this is becoming quite annoying as the reason i put the lines around the boxes,was so when the report is output it looks like the original.

Help please!!

View 7 Replies View Related

Word Merge..

Apr 27, 2006

Im having a problem getting this code to work.
It is meant to fire up Word (which it does), open up a new doc based on the template (which it also does) and then populate a field in the doc with data from the query table (which it doesn't).

I've put the fields in the Word doc via firstly, defining them as Custom Document Properties in the File, Properties box, and then as "{ DOCPROPERTY "<fieldname>" *MERGEFORMAT }" codes in the text.

The field in the Word doc is type 'text' and the field in Access is type 'text', so I am stumped by the "Type Mismatch" error it gives when attempting to get/open the recordset.
It hasnt even got to transferring the values across to the doc.?

Ive not done this before (Access newbie) and even found creating the custom fields in Word not as straighforward as I expected!

Please can someone help?


Private Sub butDocPreview_Click()

Dim dbs As Database
Dim objDocs As Object
Dim objWord As Object
Dim prps As Object
Dim rst As Recordset
Dim strClient As String
Dim strAccountManager As String

On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err.Number = 429 Then
'Word is not running; creating a Word object
Set objWord = CreateObject("Word.Application")
Err.Clear
End If

On Error GoTo cmdWord_ClickError
DoCmd.SetWarnings False
'Open query..
DoCmd.OpenQuery "qryClientDocHdr_Export"
intCount = DCount("*", "tmpClientDocHdr")
Debug.Print "Number of Text items: " & intCount
' Check that there is at least one line..
If intCount < 1 Then
MsgBox "No text to process; cancelling"
Exit Sub
End If

Set dbs = CurrentDb
'==stops here with "Type Mismatch" error==
Set rst = dbs.OpenRecordset("tmpClientDocHdr", dbOpenDynaset)
With rst
strClient = Nz(![Client])
strAccountManager = Nz(![AccountManager])
End With
rst.Close
...
...
...

View 3 Replies View Related

Images & MS Word

Apr 13, 2007

To queries here:

Database is the MS Contacts Template with minor adjustments.

1. Trying to insert a link to an image using a bound OLE object in my form. Now I've got it top work. However, the link appears normal size in the centre of the object box. Problem is when I resize the oject box so that llink text just fits fine. The text resizes with the box and you need a microscope to read it.

2. I want to be able to cerate merged letter but I cant select Tools>Merge it with MS word fro some reason (i've aslo tried with with DB's we use in work with same problem) but publish with Word is available.:confused:

I am by no means an expert with Access so please, please post replies in lamens terms.

Thanks,

Marc

View 2 Replies View Related

Access To Word

Jul 9, 2007

Hi,

This is my First post - so please be kind. I'm quite new at coding things and have learnt almost every thing from this forum so far by search old posts but can't find the answer to the below. I know how frustrating it must be to answer the same question over and over again so if this has been answered before please accept my appologies and if you could direct me to the old post I'll pick it up from there.

I have managed to get my DB to output to Excel using the below code:

Set Xl = CreateObject("Excel.Application")
Xl.Visible = True
Xl.Workbooks.Open ("C:TEMPPACLPACL - Blank") ',,True

Xl.range("C8").Value = [Text78]
Xl.range("C9").Value = [tender name]
Xl.range("C10").Value = [Request Number]
Xl.range("F10").Value = [Accepted offer]
Xl.range("C14").Value = [Site Status]
Xl.range("C16").Value = [Accepted offer SPO]
Xl.range("C17").Value = [Type]
Xl.range("C19").Value = [Mpan]
Xl.range("C20").Value = [HH MOP]
Xl.range("C32").Value = [Payment Terms]
Xl.range("C13").Value = [No of sites]
Xl.range("C4").Value = [Text173]
Xl.range("A47").Value = [Additional comments]

I now need to do the same for word;

I have managed:

Dim oApp As Object

Set oApp = CreateObject("Word.Application")
oApp.Visible = True
oApp.Documents.Open ("C:TEMPQuatation") ',,True

but I have no idea how to get the info held in field [tender name] in my database into the Ln 5, col 10 in my word document.

I hope this makes sense, any help will be greatly received as I am very new at this and very eager to learn.

View 4 Replies View Related

Word Doc Association.

May 23, 2005

i've a question.

is there a way to associate a word document to a table entry?

i would like to create a database of microsoft word files where you can search for a certain keyword that is linked to a word document. is there a way to do this?

View 2 Replies View Related

Record Cant Contain The Same Word, How?

Jan 4, 2007

Im new here so Hi!My name is jitze de wilde. Im from the netherlands. Im 21. I work at www.visualmedia.nlOn my current asignment im collecting data on all the business in the local area.I aquired alot of information and there are bount to be duplicates. now my question. Is there a way in Access to fish out duplicate items or records (dont know the name)?example:I enter the following data.Kreeft Holding B.V.Agarica B.V.S.I.T. Controls B.V.Robatechniek B.V.Mannak Techniek B.V.Kip Caravans B.V.Van Venrooy B.V.Robatechniek B.V.In the list Robatechniek B.V. exists twice. Is there a way access will prompt a message "item already exists" or something like that?

View 7 Replies View Related

Retreive A Word

Jun 22, 2007

Hi there

I have a table in my database with a field called description. Imagine if one of my discriptions is "I learn a lot in access world forums". I need a query that if I look only for a word "access" will retrieve this discription. Is this possible to be done in access?

Thanks

View 3 Replies View Related

Publishing With Word

Mar 7, 2005

How do I Pubish a from from access into word using a word template i have created? and not just into a blank word document?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved