|
Let's say I have this variable:
word = "habit"
which command in VBA will allow me to count how many characters are there in this variable (in my case it's 5).
Important: the variable "word" contains only one word, no spaces, but may have contain numbers...
Started by brilliant on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
word = "habit" length = Len(word)
Use the Len function
length = Len(myString)
Do you mean counting the number.
Len(word)
Although that's not what your question title asks =)
Len is what you want.
|
|
I have a (set of) word document(s) for which I'm trying to get various properties (number of pages, author etc) using Win32::OLE in Perl:
print $MSWord->Documents->Open($name)-> BuiltInDocumentProperties->{"Number of pages"}->value . " ...
Started by MatthieuF on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Is the Perl response always consistent with the page count of the first section? I'm wondering if page-count is dependent upon the currently selected printer/setup, and the "Perl printer" (whatever that is) is setup differently than the ....
|
|
Is there a way to make a paragraph in a Microsoft Word 2003 document readonly using VBA?
Started by joe on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
WdCharacter, Count:=11, Extend:=wdExtend Selection.Editors.Add wdEditorEveryone ActiveDocument.protect.
|
Ask your Facebook Friends
|
This is basic stuff, but I'm somewhat unfamiliar with VBA and the Word/Access object models.
I have a two column database of about 117000 records. The columns are 'surname' and 'count'. I want a user to be able to type SMITH in a textbox and hit submit...
Answer Snippets (Read the full thread at stackoverflow):
First of all, be careful naming the column 'count' -- this is a keyword in SQL and might cause, _ Connection:="TABLE Members", SQLStatement:= _ "SELECT [Count] FROM [Members]" _ & " WHERE Surname.
|
|
I was wondering how to avoid using Windows clipboard, when you want to "replicate" multiple sections of a Word document (using VBA in macros)
Why to avoid? Because we're using Word on a server, in a multiuser environment (I know that it is officially ...
Started by keftebub on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
WdCharacter, Count:=-1 //' somehow the last word of the contents of the cell is always Chr(13) & Chr(7 into other programs for the stuff i'm doing - but for the time being I'll have to stick with Word i'll end up copying formatting....
|
|
I need to create documents, (~150 reports, letters) mostly from pre-existing snippets and local databases, with VBA, in Word 2003. I then need to change specific parts of those snippets, such as dates, phrases, user information, &c. There are also, obviously...
Answer Snippets (Read the full thread at stackoverflow):
While Microsoft is saying that VBA will not go away, I think.
2003 should be reconsidered.
|
|
Hi, I'm trying to write a Word macro which inserts data from the Current User in Registry into predefined bookmarks in the document. I've got an ini-file which dictates what the names of each registry entry is, and that value is then imported into a loop...
Started by Kenny Bones on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Do i need to select any references ....
Insert using your code End If
This code i m trying o run but it's not working for me .
Why don't you check if the bookmark exists before inserting the name?
If ActiveDocument.Bookmarks.Exists(sBookmarkName) Then .. .
|
|
I have been struggling with clipboard operations from Word VBA. I have spent dozens of hours Googling this, and although there are some partial examples that sort of work (sometimes), I was unable to find what I really needed. So I wrote it, and will ...
Answer Snippets (Read the full thread at microsoft):
Ha!
Any other ideas for Word 2007 VBA, that is VBA 6.0 ???? There are very few differences....
This seems more difficult.
Word is so big, it would take.
That can teach you everything about VBA for any version of Word.
|
|
I have an Excel spreadsheet containing a list of strings. Each string is made up of several words, but the number of words in each string is different.
Using built in Excel functions (no VBA), is there a way to isolate the last word in each string?
Examples...
Started by e.James on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
It's hard to answer your question properly if you don't indicate what makes VBA inappropriate (since you can write your own macros and functions in VBA, making it equivalent to the built-in functions
This gives you the position of the last....
|
|
Hi All,
I have some VBA developement experience and have developed a tool using MS access / VBA code which
retrives information such as computer name, ip, user name, application installed etc. for remote computer
, which is working fine.
This tool i run...
Started by alpweb on
, 5 posts
by 3 people.
Answer Snippets (Read the full thread at webdesignforums):
Online m3n0tu18 Contributing Member Message Count: 1,007 Likes Received: 179 Trophy Points: 63, word can be a HTML editor ( adds a ton of bloat to the code ), but lacks functionatity to work by using vb scripts, but I really don't think ....
|