chr(13) (and "^p") in a VBA macro is sometimes skipped when the macro is run. The macro is intended to insert various predefined strings into a word doc.
Example:
istring(1) = "This is some text"
istring(2) = "This is more text that appears in a new paragraph"
Set objselection =...
Great suggestion.
I just needed to add "text" to:
If .Range.Characters(1).text = ChrW(61558) Then
and the following two gave errors so I removed them:
.MirrorIndents = False
.TextboxTightWrap = wdTightNone
but otherwise it is working perfectly.
Thanks!
Exactly. However, if the text is longer than one row, it will wrap but does not allign with the row above.
Now is the time
other stuff blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah
more stuff
for all good men
no tab
nada...
3rd try:
This is the string of text that is replacing the string ”sbullet2”. “sbullet2” is actually a place holder that I entered from a previous find/replace entry. This is the string of text that is replacing the string ”sbullet2”. “sbullet2” is actually a place holder that I entered from...
Correction:
The 'after' example above didn't wrap as it did in my preview. I meant to illustrate that the subsequent lines do not indent correctly as shown here:
This is the string of text that is replacing the string ”sbullet2”. “sbullet2” is actually a place holder that I entered from a...
What I mean is, my code adds a bullet as a symbol, not actual bulleting format, the second line does not indent because it's not actually a bullet.
Before:
sbullet2This is the string of text that is replacing the string ”sbullet2”. “sbullet2” is actually a place holder that I entered from a...
I'm using an excel macro to find/replace a string with a formatted bullet in word. The code I'm using inserts a symbol and the formatting does not apply (i.e., the bulleted text does not allign with an indent). I need an actual bullet. Any ideas?
wdAPP.Selection.Find.ClearFormatting...
Thanks to both of you for the help. I'm going to stick with the code I pasted above and change the rows to 1000, which will suit my needs and speed up the macro.
Thanks vz. I used a similar method and it works. Unfortuntaely it checks all 65536 rows so it's taking about 20 seconds to complete. I need it to work in millaseconds.
My intended use is to embed this in other macros that are being used by many users, so that I can do some analysis on usage...
Skip, I added the constant but it is a Syntax problem. I believe Extra will not allow the word End in there.
I do have access to the excel object library.
Sub Main()
Dim objxl as Object, wb As Object
Dim sUserName As String, stime
Const xlDown = -4121
sUserName =...
Thanks for that Skip. I've been messing around with the End(xldown) and I keep getting a syntax error. It's specifically the End(xldown) that doesn't work. Any thoughts?
I think this is a simple one but I can't get the syntax correct. I need to find the first blank row in excel and input some data.
I can do this in VB but can't quite tweak it to work with Extra. Any suggestions?
Here is my macro, I want to go to the first blank row instead of "A1"
Sub Main...
I'm wondering if anyone has come up with a solution to count how many times a macro is executed. We have some macros distributed to multiple users and I'd like to know how many times they run them.
I thought of including some script to have a tally produced on a central excel spreadsheet but I...
I'm trying to scrape data from Attachmate and export to a custom screen panel on an app hosted in IE. With a little help from this forum I've got code functioning but I can't get the data to populate. Any thoughts on how to get control of the panel?
Here's my code so far. The issue I have is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.