TextBox and Tables - a couple of questions
Folks;
What I want to do is essentially 'mail-merge' but the user is not going
to be placing merge tags.
They will simply put placeholders that I will substitute with data in
my script.
They will be placing the text in normal layout, inside of textboxes,
and inside of tables.
Could be some or all of the above.
How do I determine if there are any TEXT BOXES and then iterate over
them changing .Text any 'abc' to 'xyz'? (TextBoxes just puzzle me...)
For Tables I've figured out that I can do:
With ActiveDocument.Tables(1)
For i = 2 To .Rows.Count
For j = 1 To .Columns.Count
[do something with .Cell(i,j).Range.Text]
Next j
Next i
End With
But:
1) How do I determine how many tables there are and then iterate over
them successively?
2) Is there a smarter way than walking every thru cell and checking for
.Range.Text?
In the general layout (not in a TextBox or a Table) is this the
preferred solution:
With Selection.Find.Text ="abc"
.Replacement.Text = "xyz""
.Forward = True
.Wrap = 1
.Format = False
End With
ReplaceAll()
Thanks for any insight!!
Steve Tag: Run Macro automatically Tag: 82447
import data into text from in ms word
Hello,
can anyone tell me how to import data into text form?? the data either from
excel or access..
Do i need put the macro into a button??
please help me... tq Tag: Run Macro automatically Tag: 82443
unlocked VBA project on XP becomes locked on Macintosh
I'm hitting a strange problem. I've got a large project that I'm
porting from Office on Windows to Office on Mac OSX.
On Windows, I open the project in the VBE, then tell it to remove
protection, so it'll be viewable without a password. If I close Word,
reopen that file, and go back into VBE, I can view the macros just
fine.
I move the file across my network to my Mac. Open it, and try to
access the macros in VBE on the Mac, and I get a Project locked for
Viewing message. Furthermore, there's no opportunity to enter a
password and view the project.
Can anyone help with this. I'm trying to debug on the mac, and can't
get to my macros to see what's going on.
Thanks in advance,
gary hillerson Tag: Run Macro automatically Tag: 82434
Revision.Type property - inconsistent results
I?m trying to add code to a macro to make it behave differently if the text it
works on has tracked changes, but Word seems to act on whim rather than reality.
Has anyone else tried to use [range_object].Revision(1).Type and gotten
inconsistent or apparently wrong results?
For example, in some documents I want the macro to add characters to a certain
word, but only if the word isn't within a tracked deletions, since that makes
the added characters UN-tracked (undeleted), so when revisions are accepted the
added characters remain while what?s around it is erased. I would have thought
code like this:
If Selection.Range.Revisions(1).Type = wdRevisionDelete Then [etc]
....where the Selection is only 1 word and definitely contains only 1 revision,
would allow the code to evaluate accordingly and consistently (and in this case,
skip the action that would be performed if the Selection had no tracking).
But very often it behaves as if this line of code isn?t there, and the action
after that line *is* performed, with unmanageable results.
Testing with MsgBox Selection.Range.Revisions(1).Type seems to return equally
baffling results -- often it returns the value of 1 for an insertion *or* a
deletions.
Am I using the wrong constant? I don?t see one that would mean the same thing.
Any help appreciated.
------------
Mark Tangard
"Life is nothing if you're not obsessed." --John Waters Tag: Run Macro automatically Tag: 82430
Disable the Research Pane shortcut
Is there a way to detach the CTRL-DoubleClick shortcut so that it doesn?t open
the ?Research? Task Pane? I have no use for that feature (or frankly for any of
the Task Panes -- I've always found them inefficient and pointlessly showy; but
that shortcut itself used to invoke the very useful Select Current Table
command. MS seems to have unbound it without saying anything -- as if upward
compatibility is less important than furthering their apparent aim to enslave us
all to these confounded Task Panes sputter sputter fume fume....
Is there perhaps a registry hack to do this? I don?t see a way to use
KeyBindings to get rid of the association, let alone reestablish it for
selecting the current table.
Thanks for any help.
------------
Mark Tangard
"Life is nothing if you're not obsessed." --John Waters Tag: Run Macro automatically Tag: 82429
code for key assignments document
Hi All,
Thanks again for yall's consistent expert adviced over the years !! :)
I'd like to create a Word file that shows the key assignments.
I assume it is something like:
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintKeyAssignments, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
True, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
MS Word 2003, Windows XP
tia
Gil
http://www.TenSecondMedicalRecord.com Tag: Run Macro automatically Tag: 82424
Resizing a EPS figure
I am attempting to write a macro that does the following:
1. Inserts a picture
2. Resizes it to Height = 601.5 and Width = 425.2
3. Inserts a caption Figure at the bottom of the picture
I tried to record a macro as below. I could succeed in recording a
macro that does 1 and 3 but I could not do 2.
How do I resize the picture?
Thanx
NSP
Sub InsertPic()
'
' InsertPic Macro
' Macro recorded 3/10/2006 by ..
'
Selection.InlineShapes.AddPicture FileName:= _
"C:\SIMPOW\MultiInfeed\NF10fd_No_Pump\With SVC\List
Series-2\Block of 2 pole GUG1 Q 300 MVAR PFC\plot_nf10fd_sheet_1.eps" _
, LinkToFile:=False, SaveWithDocument:=True
Selection.TypeParagraph
Selection.InsertCaption Label:="Figure", TitleAutoText:="",
Title:="", _
Position:=wdCaptionPositionBelow
Selection.TypeText Text:=":"
End Sub Tag: Run Macro automatically Tag: 82419
"Backspace" to a Function Key
How do I assign "backspace" to a function key? I can't find that function in
the "Commands" box to assign it to a function key... Tag: Run Macro automatically Tag: 82400
I set up water mark for 1st page but I type I get it again on 2n
I'm making a template. I have set up the water mark on the 1st page only, the
second page is blank.
However when you use the template and start typing on it. When you type down
to the second it page, the document inserts another page that looks just the
the first page, and not like the blank second page like it should.
Help! Tag: Run Macro automatically Tag: 82398
Mail merge creates multiple instances of Word
Hello everyone,
I am have inherited some code that does a mail merge of client forms in
powerbuiler. The underlying problem is not with powerbuilder, but in
how the ole object is working. I've opened a word application thru
code and have populated the datasource.
// active external application
la_OLEReturn = ole_1.Activate(Offsite!)
// open datacource
ole_1.Object.Application.ActiveDocument.MailMerge.OpenDataSource("c:\mail_merge\datasource_"
+ string(al_header_id) + ".rtf",
0,FALSE,FALSE,FALSE,FALSE,"","",FALSE,"","","","","")
// hide the merge codes, so the actual value can be seen
ole_1.object.Application.ActiveDocument.MailMerge.ViewMailMergeFieldCodes
= FALSE
// execute the merge.
ole_1.object.Application.ActiveDocument.MailMerge.Execute
// set print background to false, otherwise MS Word complains that
'Word is still Printing'
ole_1.Object.Application.Options.PrintBackground = False
// Print the merged documents
ole_1.object.Application.ActiveDocument.PrintOut(-1)
// close the current document
ole_1.object.Application.ActiveDocument.Close(0,1)
Everything works and prints fine, just not the way we want it to. When
the Active(Offsite!) executes, it opens an instance of word and then
populates it with the datastore when that is fired. When the Execute
fires, that opens up a new instance of word with merged data. Then it
prints and closes as code is fired. We do not want to have new
instances of word opening and closing up like a slide show when there
are multiple forms being printed. Is there a way to have the mail
merge stay within the first opened word instance or even just a second
one?
Thank you for the help. Tag: Run Macro automatically Tag: 82397
My black ink is full, yet my resume won't print out?
My Ink is full, but when I go to print a document, it prints, but no words
appear on the printout??? I have cleaned the heads, shaken the ink
cartidges, I don't know why my ink won't print out?? Tag: Run Macro automatically Tag: 82396
A 'formatted' text box?
I want to display a certain portion of text onto a user form, but I want the
formatting to carry into the text box I have created for this purpose. How
can I do that? (Right now the best I can get is plain, unformatted text,
with fields showing up as square blocks.)
e.g., :
textbox1=selection.text
Can it be done?
Ed (in Virginia) Tag: Run Macro automatically Tag: 82395
Calendar control not displaying its text
On my own PC (XP and Office 2003) I have developed a macro
which includes a calendar control. The calendar displays ok on
my PC but on a PC that runs Win 2000 with Office 2000 the
calendar outline shows but there is no text. I have tried copying
my version of mscal.ocx to the W2000 PC but still no joy.
Is it a font thing or what?
Thanks,
Seamus
. Tag: Run Macro automatically Tag: 82394
Word 2003 - Template and Automation
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C64436.B16225C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Automating Word from VB6 to display a formatted document (multiple =
columns, line numbers, etc.)=20
The contents of the document is rtf text which is copied to the =
clipboard and pasted into Word.
Using Word 2002 this worked fine - but with Word 2003, the document =
(based on a template) loses it's formatting when the PasteSpecial action =
occurs ...=20
Some of the relevant code:
' copy rtf text to clipboard
Clipboard.Clear
Clipboard.SetText tText, vbCFRTF
... (attach to existing instance of word or start new one code)
mobjWord.ScreenUpdating =3D False
Set mobjDoc =3D mobjWord.Documents.Add(Template:=3DApp.Path & "\" & =
szTEMPLATE_NAME) ' add document based on our template
mobjDoc.Variables.Add Name:=3D"StimID", Value:=3DszDocName
mobjDoc.GoTo What:=3DwdGoToLine, Which:=3DwdGoToAbsolute, Count:=3D1
mobjDoc.Select
=20
.Selection.PasteSpecial DataType:=3DwdPasteRTF ' paste RTF text =
from clipboard
.Selection.WholeStory ' =
select entire document
As mentioned this works fine with 2002 ...
I do have this working with 2003 by setting all the template =
characteristics in VB6 code ... page setup, line numbering, etc. but =
there are a lot of instances where we do similar things in various =
projects. I was hoping not to have to recode all of them.
Any insight into this problem would be greatly appreciated.
BTW, I noticed that when using Word alone (no automation) - I can create =
a new document based on this template (multiple cols, line numbering, =
etc). However when I paste rtf text into this document, all formatting =
is lost UNLESS I choose Text Only from the dropdown after pasting, in =
which case all rtf character formatting (bold, italics, etc.) is lost.
Thanks,
Mike
------=_NextPart_000_0007_01C64436.B16225C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=3D2>Automating Word from VB6 to display a formatted =
document=20
(multiple columns, line numbers, etc.) </FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>The contents of the document is rtf text which =
is copied=20
to the clipboard and pasted into Word.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Using Word 2002 this worked fine - but with Word =
2003, the=20
document (based on a template) loses it's formatting when the =
PasteSpecial=20
action occurs ... </FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Some of the relevant code:</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2> ' copy rtf text to =
clipboard<BR> =20
Clipboard.Clear<BR> Clipboard.SetText tText,=20
vbCFRTF</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>... (attach to existing instance of word or start =
new one=20
code)</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2> mobjWord.ScreenUpdating =3D=20
False<BR> Set mobjDoc =3D=20
mobjWord.Documents.Add(Template:=3DApp.Path & "\" &=20
szTEMPLATE_NAME) ' add document based on our=20
template<BR> mobjDoc.Variables.Add Name:=3D"StimID",=20
Value:=3DszDocName<BR></FONT></DIV>
<DIV><FONT size=3D2> mobjDoc.GoTo What:=3DwdGoToLine,=20
Which:=3DwdGoToAbsolute, Count:=3D1<BR> =20
mobjDoc.Select<BR> <BR>&nb=
sp; =20
.Selection.PasteSpecial =
DataType:=3DwdPasteRTF '=20
paste RTF text from clipboard<BR> =20
.Selection.WholeStory &nbs=
p;  =
; =
=20
' select entire document</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>As mentioned this works fine with 2002 =
...</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>I do have this working with 2003 by setting all the =
template=20
characteristics in VB6 code ... page setup, line numbering, etc. but =
there are a=20
lot of instances where we do similar things in various projects. I was =
hoping=20
not to have to recode all of them.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Any insight into this problem would be greatly=20
appreciated.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>BTW, I noticed that when using Word alone (no =
automation) - I=20
can create a new document based on this template (multiple cols, line =
numbering,=20
etc). However when I paste rtf text into this document, all =
formatting=20
is lost UNLESS I choose Text Only from the dropdown after pasting, =
in which=20
case all rtf character formatting (bold, italics, etc.) is =
lost.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Thanks,</FONT></DIV>
<DIV><FONT size=3D2>Mike</DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2></FONT><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0007_01C64436.B16225C0-- Tag: Run Macro automatically Tag: 82393
Kill a UserForm
I am trying figure out how to "terminate" a userform and code in
progress if a user clicks a "Cancel" command button or the "X" on the
form. Here is the problem. The user enters text in a textbox that
could result in an error. That text is passed as a variable to another
sub as part of a Do Loop. If the error is generated, the user is
notified with a msgbox and the form is displayed with the invalid entry
highlighted. At this point, I want the user to be able to cancel the
process and eliminate any additional UserFrom code from running. I
mean I want to kill it until it stops breathing completely.
I can't get it worked out. I have duplicated the problem in the simple
scenario provided below. All it takes is a user form, 1 text box, and
2 command buttons. Enter the value "2" in the text box and click the
command button 1. When the error is generated and you are returned to
the form then click the cancel button. This is where I want to strike
the death blow, but as you will see the code continues to running
(bypassing oddly enough the call) until the count of 10 is reached.
All help welcome. Thanks.
Option Explicit
Private Sub CommandButton1_Click()
Me.Hide
Dim i&
For i = 1 To 10
CallMsg i
If i > 2 Then MsgBox "Won't stop"
Next i
Exit Sub
End Sub
Sub CallMsg(ByVal i&)
MsgBox i
If i = Me.TextBox1.Text Then
On Error GoTo Handler
Err.Raise 5625
End If
Exit Sub
Handler:
MsgBox ("You must change the test in text box 1 to a number > 10")
With Me.TextBox1
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
Me.Show
Err.Clear
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub Tag: Run Macro automatically Tag: 82391
MS Word 2003 - Microsoft Office Document Imaging
Dear all,
I would appreciate if anyone could help me answer the issue I have in
relation to using the Microsoft Office Document Imaging driver (Tiff files).
In our company we currently use the Peernet tiff driver to create tiff files
for our imaging system. In Word 2003, this driver comes free. As the Peernet
Licenses are expensive we are looking at adopting the MS tiff driver. We did
some work to compare the two produced tiff images (both generated from the
same word.doc).
What we found was that at the Super fine 300, there was no real difference
in the image quality in the two file which was great, however the MS tiff
file sizes were on avaerage 25% bigger than the Peernet ones. We suspect that
the MS Tiff converter is doing more than we want it to. We believe its adding
Doc Summary Info etc, but we also believe its also putting OCR information
into the tiff document that we do not need. As the images are stored in our
imaging system we are talking about terabytes here, so and extra 25% is not
insignificant.
What I would like to know is, can a word document be converted to a tiff
file using the MS tiff driver without the surplus info (believed to be OCR
data). We cant seem to find a way to prevent it and code it accordingly.
Any help or reference material would be appreciated.
Thnaks
Shane. Tag: Run Macro automatically Tag: 82389
Saving from a template
I have made a custom template with a custom toolbar. I have added the save
command to this toolbar. When I click this the save dialog box pops up, but
the file formast is set to *.htm. how can I make sure that it will save as a
*.doc? Tag: Run Macro automatically Tag: 82379
Insert pages from one document into another using VBA
Hi
I have document 1 opened and on the click of a button I would like to insert
pages from document 2 at specific places in document 1. I know that we can
insert a whole document into another document using insertfile method, I
don't know how to only copy and insert a specific page from 1 document into
another using VBA.
Thanks. Tag: Run Macro automatically Tag: 82371
A bug of the Revisions object?
I found that the Revisions object sometimes returns wrong Revision objects
with a given item index. For example, try the following macro:
----------------------------
Sub TestRevision()
Dim Rev As Revision
Set Rev = Selection.Range.Revisions(1)
MsgBox "Revision: Type = " + Str(Rev.Type) + ", Range = " +
Str(Rev.Range.Start) + " - " + Str(Rev.Range.End)
End Sub
-------------------
Create two revisions in a document. Then select a part of the first revision
and run this macro. It is supposed to display information about the first
revision, but in fact it displays the second one. This problem occurs in Word
XP and 2003. Tag: Run Macro automatically Tag: 82370
envelope printing faded
My envelopes in Word 2000 look great on screen but with my new Lexmark X7170
print out faded. Even when I change print cartridges they print faded. I have
my color logo and normal black printing for my return address. When I had my
old HP all-in-one the printing was fine. Lexmark states that it must be a
software problem. If I copy all of the info. to a blank page and print it out
it is fine, but as soon as we go to an envelope set up it prints out faded. Tag: Run Macro automatically Tag: 82368
Problem with updating tables
Greetings,
I have a lot of tables in a lot of documents that need to be
reformatted for various reasons. Each table has 4 or 5 OLE embedded
objects in it. The tables themselves are embedded OLE objects (word
objects embedded in word). I have the code down for opening each table,
then each OLE object in each table, and resizing it to the proper size.
When I close the window that the table object is in, although
everything's been resized, Word closes it too fast to actually update
the size of the table within the object. This is important because
later on I have to figure out the exact height of the table for
placement on a page. When I gather the appropriate measurements of the
table object, it gives me the pre-resized size of the table, not the
new-resized size, which throws off the calculations, because when it
comes time to finally place the object on the page, it changes to the
new size. God, that sounds confusing.
Example: I have a table that is 3.5" wide by 3" high. I resize it to be
7" wide, which takes it down to 2" in height. But word closes out of
the OLE window too fast, so Word still thinks that it is 3" tall. Later
I re-open the table object to get the exact distance from top, and it
gives me the 3" measurement, which it then uses for it's calculations
for placement on a page. At the end of the placement, when Word has
some time to catch up, it is the proper 2" height, but now all my
calculations are off by an inch (if it were consistantly an inch, that
would be easy to compensate for, usually it's a few points here and
here).
Is there any way to force Word to update the size of the table within
the OLE object after the intial resizing of the object so that all the
calculations will be good later?
Any Ideas?
Thanks in advance. Tag: Run Macro automatically Tag: 82367
disable adding toolbars?
Is it possible to disable the adding of toolbars? For example, I only want
the Formatting and a Custom one. And I don't want the user to be able to
right-click and add another toolbar. Possible? Tag: Run Macro automatically Tag: 82366
disable adding more toolbars?
Is it possible to not permit a user to add more toolbars? I only want them
to have access to the Formatting and a Customized toolbar. Possible?
Thanks! Tag: Run Macro automatically Tag: 82362
How do I accomplish sequential numbering of created forms?
I'm having trouble creating a form (in MS Word) that advances it's serial
number automatically after the form is filled out, then the file saved and
closed out. I'm sure this can be done, I just can't figure it out. Does
anyone have any suggestions, or a link to a similar form that I might be able
to edit? Tag: Run Macro automatically Tag: 82355
capturing checkbox result
I have macros running on enter and exit of my form fields. I capture the
result of the form field during both macros and am comparing the two values
to see if the field was changed. However, if I click into a checkbox, it
changes the result of the checkbox, runs tne exit macro for the previous
field, and then runs the enter macro for the checkbox. So when it runs the
enter macro, it is capturing the changed result. Is there a way around this?
Or should I always capture the opposite result on entering a checkbox (false
for true and true for false)?
Thanks in advance! Tag: Run Macro automatically Tag: 82354
need code to select one drop down option based on a previous drop
I am looking for the code to auto select a value on one form field from input
on a previous one. The form fields could be drop downs ....or as simple as
checkboxes.
i.e. if one checkbox is checked, I want the other to autocheck as well....or
its value to be true. If a certain selection is made in the first drop-down
box, a certain selection should be set in the second drop-down. Tag: Run Macro automatically Tag: 82351
Duplex printing in Word XP on a HP 9000DN network printer
I have copied the code shown in "Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality"
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116
I have also installed a local printer que to the HP 9000DN on my computer,
but still the duplex macro doesn't work.
Thanks for any suggestion.
Frank Krogh Tag: Run Macro automatically Tag: 82334
"Run Macro on Exit" on formfield doesn't fire
Hi everyone
I searched the groups for someone with the same issue - no success. So
I'm trying it with a new subject. Here's my problem:
I am working with word2000 and I have created a word template (.dot)
with a few formfields in it. The dot has a module containing two public
routines (pCalculateTotals and pGetField). The pGetfield is added in
the "Run Macro on Enter", the pCalculateTotals in the "Run Macro on
Exit"-Event of the formtextfield.
Now I've tried this in a simple doc-File. Everything works fine. But
when I create a doc out of the dot (by doubleclicking on the dot), the
events won't fire. Why is that?
Any help is much appreciated!
Thanks a lot for your answers in advance!!
Nat Tag: Run Macro automatically Tag: 82329
How to Read the MS Word file line by line - urgent
Hi plz, tell me how to read MS Word file line by line.
I am able to open the file using the following code.
code:
Dim objWord As Word.Application
Dim objDoc As Word.Document
Dim objTbl As Word.Table
Set objWord = New Word.Application
objWord.Documents.Add
objWord.Visible = True
Set objDoc = objWord.ActiveDocument
Call objWord.Documents.Open(sFilepath, , True, True) Tag: Run Macro automatically Tag: 82322
Merging Word Form with Mailmerge doc
I created a form that our clients fill in on their computer and send back. I
want to take those fields I created with the form feature in Word 2003 and
fill in some mailmerge docs that I created mailmerge feature.
I'm sure this can be done. Basically, your getting an electronic doc from a
client and creating mailmerge documents with that data in the form.
Thanks for the help. Tag: Run Macro automatically Tag: 82320
Identifying passive voice errors
I have three questions.
Is there a way to identify text that contains passive voice errors?
Is there a way to select the words that are green underlined from
Microsoft's grammar checker?
Is there a way to derive Microsoft's grammar comment/suggestion for
green underlined text?
Thank you.
Charlie from Texas Tag: Run Macro automatically Tag: 82315
Hyperlinks in Protected Forms
Hyperlinks in Protected Forms do not work except when using Macros or when
sectioning off your form around the hyperlinks making the links vulnerable to
editing.
There should be a simple and straight-forward way to keep links working
inside forms while the form is in a protected state.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/community/en-us/default.mspx?mid=53c2b228-8081-4ca7-a653-6665ade83ef2&dg=microsoft.public.word.vba.general Tag: Run Macro automatically Tag: 82314
Add a Logical Section Break in MS Word w/no change to text format
MS Word has various Breaks, from Page Breaks to Section Breaks. However, and
especially when trying to isolate a particular word or link in a protected
form, a break is necessary to isolate the text/link. However, even the most
basic 'Continous Section Break' counts as a vertical seperation between text.
Here, a 'Logical Section Break' would be useful that would act like a
'Continous Section Break' without the vertical seperation, causing no visible
change in the document formatting and layout, but still allows for isolation
of parts of the text within the paragraph or line of text.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/community/en-us/default.mspx?mid=63e37da6-f692-435a-8572-8e0d578d6d37&dg=microsoft.public.word.vba.general Tag: Run Macro automatically Tag: 82313
Link Fields even across Section Breaks?
Hell everybody,
I may be asking this in the wrong newsgroup, if so point me in the right
direction. Otherwise, I was wondering if it is possible to link an inserted
field to a field earlier in a word document so that when I change the
original, the other fields change with it. I need this to occur even across
section breaks as well.
Thanks for the help! Tag: Run Macro automatically Tag: 82304
move a control button
After I put a control button in the word doc, I would like to know if there
is any easy way to move it around simply by dragging. When I tried to drag
it, the button always goes back to the left edge of the document. Thank you
for your help! Tag: Run Macro automatically Tag: 82303
delete the last paragragh or section using VBA
Let's say I pulled some data into word and decided to delete it. What VBA
code I can use to delete the data I just pulled, not knowing exactly the
paragrah or section #?
Thank you for your input. Tag: Run Macro automatically Tag: 82302
Splitting document on hard page break
I've seen in several posts how to split each page in a document into a
separate document. And I've seen how to search / replace hard page breaks.
What I can't figure out is how to combine them and do the following -
Take the pages between each hard page break and save them into separate
documents.
The logic should be simple - start a range, go to the next hard page break,
end the range, copy the range, throw it to a new document and save it. But
nailing the ranges by hard page break is killing me.
Thanks in advance. Tag: Run Macro automatically Tag: 82301
highlighting text in a word document
I have a list of different words in an excel speadsheet that I want to search
in a word document and if it finds that word to highlight it in red
throughout the whole document. If possible I would load these words into an
array and go through a loop to find the occurences. I do not have to use
excel, the list can be imported into word. Tag: Run Macro automatically Tag: 82300
Fill-In Field is updating in Header area on Print Preview? I don't want it to.
Hello all,
I'm having a problem with a Word2003 template. When I add a Fill-In
field within a document, it won't prompt me for it's value unless I update
it automatically. This is how I want it. When I have a Fill-In field in a
header or footer, it prompts me for its value every time I print or Print
Preview. Is there anyway to prevent this for the header and/or footer?
Thanks! Tag: Run Macro automatically Tag: 82297
Extra macro icon on toolbar?
I have added several macros to one of my standard toolbars. I just noticed
that one of them shows up twice, same icon pointing to the same macro. I
pulled it off using ALT+Left Mouse, then saved Normal from the VBE and
closed. When I opened Word again, it was back! Any clues as to what's
happening and how to stop it?
Ed Tag: Run Macro automatically Tag: 82286
Macros
Hi There
Can anyone help me with this. Is it possible to do the following in Word:-
"setting Macros to assist with electronic note-taking to WORD on Palm /
Laptop"
Do you need VB coding???? Please help
Thanks
Bronwen Tag: Run Macro automatically Tag: 82284
Document Variable Limits
Dear All,
How much text can be saved in a document variable? Is formatting
information saved along with text, or just the character string data? I've
been trying to work with them, had some success and some not so success.
Sincerely,
Ridge (in New Joisey [Exit 145]) Tag: Run Macro automatically Tag: 82272
Why the .doc file is locked for editing?
Hi, friends,
When running the following code, I got an error at line msdoc.Close (see
code below)
Run-time error -2147417851(80010105)
Dim mswd As New Word.Application
Dim msdoc As Word.Document
Set msdoc = mswd.Documents.Open("c:\templateHF.doc")
msdoc.Range.InsertFile "c:\CQInfo.doc"
msdoc.Close
mswd.Quit
As a result, could not open file TemplateHF.doc anymore. It said this file is
locked for editing.
(If before msdoc.Close, I add: msdoc.SaveAs "c:\new.doc", this new.doc is
locked for edition too).
Any ideas? Thanks. Tag: Run Macro automatically Tag: 82270
When the .doc file is locked for editing?
Hi, friends,
When running the following code, I got an error at line msdoc.Close (see
code below)
Run-time error -2147417851(80010105)
Dim mswd As New Word.Application
Dim msdoc As Word.Document
Set msdoc = mswd.Documents.Open("c:\templateHF.doc")
msdoc.Range.InsertFile "c:\CQInfo.doc"
msdoc.Close
mswd.Quit
As a result, could not open file TemplateHF.doc anymore. It said this file is
locked for editing.
(If before msdoc.Close, I add: msdoc.SaveAs "c:\new.doc", this new.doc is
locked for edition too).
Any ideas? Thanks. Tag: Run Macro automatically Tag: 82268
Best way to use a flexible word table with printmerge
I have a standard report which is produced using Word and Excel (printmerge).
In the standard report, I have tables which can vary (lines name, number of
items, column width)
I have try different solutions (2) and all of them have signifiant problems.
Does anyone have already done something like that ?
Approach #1:
I have add all tables in Excel and link it to Word using:
Link Excel.Sheet.8 "Variable_path" "Variable_cells".
The tables are very flexible but I have the following problems:
1- Standard Excel Underline height is defined as 1/2 point in Word and I
would like to have 1/4 point in Word (Would like to find a way to adjust Word
height in excel)
2- The link is not stable, Word 2003 SP3 jam often.
3- The file path name must be inside excel as a variable; I would like to
point directly to the same excel file as printmerge.
Approach #2:
All tables are make inside Word using variables. Since I want a line between
each table line, I can't put all conditions in a box.
The problems with this Approach are:
1- The table column width can't be adjusted.
2- Since I want to have border between each elements, I have to create split
the table in n box with condition on each box.
It always insert one empty line between each elements.
ex: IF( Mergefield Item9 )<> "" "
<Table with border>
" "") (this give a line between each table line)
would like to have:
ex: IF( Mergefield Item9 )<> ""
"<Table with border>"
"") (Impossible to add " in the same line as the table line)
Does it exist other solutions to my problem ??
Is there a table merge function in Word ??
(Only one excel data line is used for the text merge and tables could takes
source from excel)
Thanks.
--
Alex St-Pierre Tag: Run Macro automatically Tag: 82267
Remove XML Tag in Word
Is it possible to delete the XML tag programmatically without deleting
the text within the tag? Tag: Run Macro automatically Tag: 82265
FSO resources
Where and how can I find resources, help and explanation, for the 'scripting'
facilities in VBA, in particular the 'file system object'?
Thank you
Martin Tag: Run Macro automatically Tag: 82264
Ms Word Drop Down Behaving weird
Hello,
Im having some trouble with a drop down that i created in Ms Word. I
had used some VB code to fill in the values for the drop down. When i
open the document the drop down fills in correctly but for some reason
i cannot scroll WITHIN the drop down list. If i use the mouse wheel to
scroll the list detaches from the drop down and the whole page scrolls
up or down but the list just still remains under the cursor the way it
is. If i use the Scroll bars inside the drop down however it works
fine... whats happening here!
Regards, Tag: Run Macro automatically Tag: 82261
Dear Graham Mayor,
I read your answer ,it was complete ,thanks alot for your help.
Best regards.
Orchid