|
formatting text from recordsets
Hi,
I am a noob at word vba and I am hoping someone can help me here.
i am reading records from a recordset and inserting them into my word
document. the records are data type of text.
I am able to open the recordset and insert the records into my document by
looping through the recordset.
The problem that i am having is that I want to format certain records after
I put them into my doc...
|
2 |
17.11.2005 16:19:19 |
|
Gunning Fog Index vs. Flesch Kincaid
Is it possible to use VBA to write a macro that will calculate the Gunning
Fog Index instead of the built-in Flesch Kincaid reading ease score?...
|
2 |
16.11.2005 21:00:52 |
|
Messages on this forum
These are probably Outlook Express questions, but I thought that
someone here may know.
1) I use OE to check these forums. It seems to keep around 2 months
worth of messages, then the older ones disappear. Is there a way to
change this time limit?
2) Messages seem to be broken up into several lines. When I paste
messages into Word, I can see the new line characters (when I choose
Reveal...
|
7 |
16.11.2005 10:58:24 |
|
Font Colour
Hi,
I wrote a simple script to populate a word document with the free space
of my servers and wanted to make it stand out (large font & red) if the
value is less 15%. The code works but everything (just in column 4)
becomes large & red after the first instance of the space being less
than 15%. What is the error? - Thanks
Set objWord = CreateObject("Word.Application")
objWord.Visible = T...
|
3 |
16.11.2005 01:20:14 |
|
How do I Import text into Word
How can I import data from a plain text file into a Word document so that I
can add formatting to it? I want to automate the process and add headings,
subheadings and change fonts. What tool can be used to do this?...
|
4 |
16.11.2005 00:58:38 |
|
Paragraph Spacing
Creating a new Blank document.
The first paragraph, under Heading 4, appears to be single spaced, the way I
want it.
The following paragraph, under another heading 4, has the appearance of one
and a half spacing. Even when I go back and appy Style 2 to this paragraph,
it doesn't change this paragraph to match the first paragraph.
Below are the settings, if it helps.
Using Style 2 ...
|
7 |
15.11.2005 13:03:32 |
|
Second part of macro doesn't work
The part of this macro with the SendKeys command doesn't work. If I switch
the order, then the SendKeys works, but then the spellcheck doesn't trigger.
i.e. only the first part of the macro works
Sub test2()
If Options.CheckGrammarWithSpelling = True Then
ActiveDocument.CheckGrammar
Else
ActiveDocument.CheckSpelling
End If
SendKeys "%3"
End Sub
...
|
9 |
15.11.2005 08:20:44 |
|
data integrity
hi, everybody,
could you help me:
in my Excel file I have about 8 contingent tables. already twice by openning
this file I got message like "all contingent tables were removed from reason
of the data integrity", and all tables were in the file like only input as
values.
why?
in my VBA code I am working with these ctg tables, I am using SQL queries
etc.
thanx a lot, Lukas
...
|
2 |
15.11.2005 07:50:51 |
|
Applying styles not working properly?
I'm writing a C# app that allows exporting to a Word doc. I figured out how
to create the paragraphs and tables, and setting styles works from the code
perspective. However, when I open the document none of the styles are
applied. For instance, instead of a paragraph being "Heading 1", it will be
"Normal + 16pt" and similar for everything else. The strange thing is that
if
I do exactly the ...
|
2 |
15.11.2005 01:17:32 |
|
Is it possible to selectively print or hide pages based on a linked field?
I am looking to print pages that have linked information set to a
particular value. Can I suppress the printing or hide the page if a
particular linked item has a blank or space?
...
|
2 |
14.11.2005 11:03:41 |
|
macro to update links from excel source gives insufficient memory
Help, I am new to word macros and am trying to automate links between
word and excel on a project that will be turned over to others with
even less experience then me. My project has about 200 links although
I am thinking of breaking them up into smaller word docs to reduce the
amount of links. I have found that by having the linked (source)
spreadsheet open, this has sped up the process. ...
|
2 |
14.11.2005 00:30:20 |
|
Jay Freedman AutoText Loader - Enlarged Screentips?
Last week I raised the question of whether a sound cue could be added when
an autotext screentip appeared so that I wouldn't have to try to watch the
screen out of the corner of my eye as I typed.
Since I used Jay Freedman's terrific autotext loader to add over 1,000
autotext entries for my particular needs (a daily newsletter), this would be
a welcome enhancement. Jay was kind enough t...
|
2 |
12.11.2005 14:59:12 |
|
InStr() as If - condition seems not to work
Hi.
Office 2000. Excel VBA.
The following "if" structure didn't work:
If InStr(Zeile, ":") And Not InStr(Zeile, "h:") Then '
statement
End If
"Not work" means, that "statement" was executed if there was ":" present, regardless of wether "h:" was present in the line or not.
The following workaround worked:
boolHColon = False
If InStr(...
|
4 |
11.11.2005 17:15:49 |
|
Symbols in Form Fields
Can someone tell me how I would put the section symbol (§) in a form field?
Thanks!!
...
|
3 |
10.11.2005 20:15:19 |
|
E-Mailed Templates Do Not Maintain Medium Security Level
The security level of my e-mailed templates changes to low so the macros
are disabled. Why?
...
|
2 |
10.11.2005 16:27:34 |
|
The great Homophones Problem.
Hello NG friends,
I am trying to include in an existing macro a routine to offer help to
learners writing English. Their finished text is analysed and a table
of various errors displayed below in the document. Homophones are, of
course, not picked up by SpellCheckers, but the teacher can mark them
(in this case with a blue background) and the macro makes the marked
words (=BluWords) appear...
|
1 |
10.11.2005 10:43:55 |
|
Organizer Question
I have a document with code, right click menus (short cut toolbar), and
toolbars added to the document and everthing is saved to the document.
For some reason I have one person so far that when they open the
document the organizer references their Normal.dot not the document.
Is there a way to make sure this value is set to the document on the
open command or is it some Word setting I can n...
|
13 |
09.11.2005 19:53:55 |
|
checking multiple controls via click events
Hi,
I've been trying to figure this problem out without any sucess.
I have a userform within a word document, and the form has about 100
checkboxes and a similar number of ComboBoxes. For example, if a
checkbox is called 'x', the combobox will be called 'x_combo'.
Currently, if I click on 'x', 'x_combo' is enabled, but if 'x' is
unchecked, 'x_combo' is disabled.
The code is below, b...
|
7 |
09.11.2005 16:58:42 |
|
It works but can someone explain why the others don't?
I have tried the following code three different ways as shown below,
but only one worked, the other two displayed nothing on the word doc.
If someone can explain why that would be great. I am learning VBA and
would like to understand the reasons.
1st Example that didn't display anything on the doc:
Dim strX as String
strX = "X"
If chkFiling.Value = Checked Then
ActiveDocument...
|
2 |
09.11.2005 03:11:59 |
|
Jay Freedman Autotext Loader- Adding Sound Cues
Jay Freedman's autotext loader has, by now, saved me many hours of work.
(Thank you Jay.)
But I would really like to have Word play a sound cue when the autotext
screentip appears so I don't have to also be watching the screen as I am
typing. Does anyone know how I could do this?
Alan
...
|
3 |
09.11.2005 02:59:55 |
|
Change defined text in all docs in a directory and then saving
Good afternoon,
I have a directory that contains close to 950 word documents. Each one
has the name of a one staff member in the rely too field. That staff
member has left and the name must be replaced with a new name.
This is an exercise I will only have to complete once as the system
that uses these letters is being retired soon.
However, can anyone advise a programatical way to open...
|
4 |
08.11.2005 16:40:33 |
|
delete file in close event
Is there any way to delete a file that's not needed any longer e.g. during a
document_close event? Apparently the file needs to be really closed first
before it can be removed from the file system and thats what I am struggling
with.
Any help welcome!
tb...
|
6 |
08.11.2005 15:46:25 |
|
function Instr
I have the following string:
"test01 test02 test03"
Now I want to get, with the instr function, the first word of the string
'test01'
I use: word01=instr(1,"test01 test02 test03"," ",vbTextCompare)
But I got not the result "test01".
Who can help me?
Jan
...
|
7 |
08.11.2005 10:25:05 |
|
Proper way to select an object in the document to get its name
I am familar with recording macros in excel very well, but not so much in
word. I have a thesis and one of the comments I got from my reviews was that
it is confusing to have my cross references show up as Figure n -
"Description of figure", which is a requirement to name the figure that way
in the caption. I know that in word for a cross reference I can just choose
to show on the labe...
|
1 |
07.11.2005 20:33:10 |
|
Oh, the frustration!
http://word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm
The site above has provided me with the following code (notice the error on
line 5):
Sub AddPeriod()
Dim BMRange As Range
'Identify current Bookmark range and insert text
Set BMRange = ActiveDocument.Bookmarks("Text1").Range
BMRange.Text = "Hello world" 'I get an error on this line: "Run-time
error '6028': The r...
|
11 |
07.11.2005 17:19:46 |