AutoOpen macro doesn't run
this macro issupposed to automatically display the AutoText menu when a
document is created from a template:
Sub AutoOpen()
CommandBars("AutoText").Visible = True
End Sub
When I create a new document from the template, and tell Word to enable
macros, a new document opens but the autotext menu does not display. Why? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113488
custom ui editor getting rid of code
I don't know if it something I am doing or not - but it is driving me crazy.
I am using the Custom UI Editor to customize the ribbon in Word 2007. I
create my ribbon and saved to my template. I then opened the template and
added the RibbonControl vba code and a module containg some code for showing
message boxes, etc. Saved the template. All code is present.
Then I went back into the Custom UI Editor to make changes, saved it to the
template, but when I opened the template in Word, all my previous modules and
code are gone.
What am I doing wrong? Help! Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113477
Macro execution by Autotext entry
Hello,
Is there any way to get an autotext entry to execute a macro? In other
words, I'd like to create an autotext entry that when the user gets the
pop-up to press enter, that when they do, it executes a macro. I'm pretty
sure there is no way to do this but I just thought I'd ask to be sure. I'm
using Office 2003 but 2007 available.
Thanks,
Peter Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113473
Word interop from c# - Find replace sometimes not working
I use the following code to replace all instances of "[VAR]" with "value to
set" in a word document :
Word.Document document;
...
Word.Range rng = document.Content;
rng.Find.ClearFormatting();
Object findText = "[VAR]";
Object matchCase = Type.Missing;
Object matchWholeWord = Type.Missing;
Object matchWildcards = Type.Missing;
Object matchSoundsLike = Type.Missing;
Object matchAllWordForms = Type.Missing;
Object forward = true;
Object wrap = Word.WdFindWrap.wdFindStop;
Object format = Type.Missing;
Object replaceWith = "value to set";
Object replace = Word.WdReplace.wdReplaceAll;
rng.Find.Execute(ref findText, ref matchCase, ref matchWholeWord, ref
matchWildcards, ref matchSoundsLike, ref matchAllWordForms, ref forward, ref
wrap, ref format, ref replaceWith, ref replace);
On most pc's, this ALWAYS works fine, but on some pc's, it NEVER works.
The text is not replaced, nothing happens.
I had this problem 2 times until now, while 13 other machines worked
perfectly.
Then I tried :
...
Object replaceWith = Type.Missing;
Object replace = Type.Missing;
while(rng.Find.Execute(ref findText, ref matchCase, ref matchWholeWord, ref
matchWildcards, ref matchSoundsLike, ref matchAllWordForms, ref forward, ref
wrap, ref format, ref replaceWith, ref replace) == true)
{
rng.Text = "value to set";// The range is now changed to the found "[VAR]"
instance, we can replace it
rng = document.Content;// reset to loop further
}
This also does or does not work on the same systems.
The basic problem is, that the Find.Execute method does NOT select the found
text part on those pc's where it does not work. Also when I tried to work
through Selection.Find (instead of using Range.Find), nothing changed.
So at this moment, I have before me 2 almost identical pc's, with the same
windows and office version (office XP SP3), handling the same document, and
on 1 pc it works, on the other one it does not. I checked all Word options
and settings, there is no difference.
Does anyone have any idea where this is coming from ? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113470
protected form checkbox macro
This was previously discussed as subject "RE: if chkbox is ticked then
un-strikethrough textbox text" - where I used an active-x control as the
checkbox, but I found out that I need to use a protected form. I want to
convert Jean-Guy Marcil's code (thank you Jean!) to something I can use with
a protected checkbox.
So far I have...
Sub Click() 'I call this in the checkbox properties - run macro on
entry/exit
ToggleStrikeThru Selection.Range
End Sub
I get a Runtime Error 5941 with the next part (The requested member of the
collection does not exist)
Sub ToggleStrikeThru(rngStrike As Range)
With rngStrike.Rows(1)
.Cells(2).Range.Font.DoubleStrikeThrough = Not _
.Cells(1).Range.InlineShapes(1).OLEFormat.Object.Value
.Cells(3).Range.Font.DoubleStrikeThrough = Not _
.Cells(1).Range.InlineShapes(1).OLEFormat.Object.Value
End With
End Sub Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113464
Word 2007 Font.Color fun
Can someone please help me understand what gives with Font.Color values in
Word 2007?
Recording a macro to see the Font values for Heading 1 style in a new 2007
document, the Color value is:
.Color = -738148353
I don't think this corresponds to an RGB value, even though the 2007 VBA
Help says the Font.Color property:
"Returns or sets the 24-bit color for the specified Font object. Can be any
valid WdColor constant or a value returned by Visual Basic's RGB function."
If I record a macro where I select Heading 1 style, choose Modify > Format >
Font, click OK to close the Font dialog, then OK again to close the Modify
Style dialog, the Color value is:
.Color = 9527094
Exact (?) same colour, very different value, which is an RGB colour.
Does anyone know how to get the correct RGB colour value in the first place
without having to drill down through dialogs? I need the RGB colour for a VB
application.
Many thanks for any help. Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113460
F&R or Macro sort on last word in a line for selection
Hi, how do I sort on last word of selection in Word.
I want to select a group of single lines (as below) about 1,000 and sort by
last word only? I know I can I never remember how! Thanks in advance for any
help.
objCC.DropdownListEntries.Add "Dr Edward Rowel"
objCC.DropdownListEntries.Add "Dr Michael Adams" Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113459
inserting autotexts into word document
Hi,
I have a question in regards to autotexts in word 03. At the moment, there
are 4 autotexts being used in my word document template. Each autotexts have
their own contents. For example,
we have autotexts for "methodology", autotexts for "executive summary",
"Bibliography", and "Glossary"
To insert these autotexts into word document is via a userform. User can
click the ones he/she wants to incorporate into his/her word report.
My question is there will be a case where user needs to add another
autotexts to the existing word report. For example, in the existing report,
there are methodology, executive summary, bibliography and glossary. Now, he
wants to add another autotexts called "Sections". This autotexts, by our
standard, should go between "executive summary" and "bibliography". My
headache is whether there're some way of inserting this new autotexts
somewhere between executive summary and bibliography?
Thank you in advance
url:http://www.ureader.com/gp/1022-1.aspx Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113458
inserting autotexts into word document
Hi,
I have a question in regards to autotexts in word 03. At the moment, there
are 4 autotexts being used in my word document template. Each autotexts have
their own contents. For example,
we have autotexts for "methodology", autotexts for "executive summary",
"Bibliography", and "Glossary"
To insert these autotexts into word document is via a userform. User can
click the ones he/she wants to incorporate into his/her word report.
My question is there will be a case where user needs to add another
autotexts to the existing word report. For example, in the existing report,
there are methodology, executive summary, bibliography and glossary. Now, he
wants to add another autotexts called "Sections". This autotexts, by our
standard, should go between "executive summary" and "bibliography". My
headache is whether there're some way of inserting this new autotexts
somewhere between executive summary and bibliography?
Thank you in advance
url:http://www.ureader.com/gp/1022-1.aspx Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113457
Late binding code
Hi
I have the below code to create a word document programmatically. What would
be the late binding version of this code?
Many Thanks
Regards
Dim obj As Word.Application
Set obj = GetObject(, "Word.Application")
obj.ActiveDocument.Activate
With obj
.Selection.Text = "Some text..."
End With
obj.Visible = True
Set obj = Nothing Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113454
Copy from Excel to Word - dropping characters
I am not sure if my problem here is a Word or Excel problem.
In the code below, I am copying data from an Excel worksheet to a
Word
doc. It works great, except only the first 1024 characters in a cell
are getting copied. The rest is getting dropped. I have verified
the
data (over 1024) is in the Excel cell when it is copied. I can't
figure why this is happening. I know some eariler versions of Excel
had display limitations. I have also
tried formatting the worksheet before it is copied to make sure all
data is visible in the cell before it's copied and it still drops
char
over 1024. Any ideas would be greatly appreciated.
I am using Excel 2002 and 2003 and Word 2002 and 2003
Anne
-----------------
Sub PasteDataTest()
'go to the worksheet and copy the data to the word file
Worksheets("Temp").Activate
Range("A1").Select
ActiveCell.CurrentRegion.Select
Selection.Name = "myRange"
' copy the range, assumes current excel active workbook
Range("myRange").Copy
' Paste as formatted text.
WordApp.Selection.PasteSpecial Link:=False, DataType:=wdPasteRTF,
_
Placement:=wdInLine, DisplayAsIcon:=False
End Sub Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113453
Print Continuous Page Numbers Excel & Word Document
I need to print a Excel & Word document as 1 combined document. It is very
important the page numbers be accurate because it is a legal doument. The
Excel part prints first, and then a 5 or 6 page word document prints at the
end. The page number format on the entire document is "Page 4 of 20"
(4=Current Page, 20=Total pages both documents). I have all the code working
except I can't figure out how to start the Word document with page 16
(Assuming 15 is the last page of the Excel document that is printed). I never
did anything in Word VBA before this, I have been doing Excel VBA for years. Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113449
Word 2007- Can Default Template Tabs be hidden?
Is there any way to hide the Default tabs so they don't appear in the
Templates dialog box? MS KB Article 826867 indicates that you can mark them
as unavailable in the Setup program. I was unable to find this when I ran
setup on Office Professional.
Thanks. Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113448
Question regarding an Excel to Word link in a Word doc
Hello,
If this is posted in the wrong group, sorry, and could you please direct me
to what group.
I have a word doc and an excel sheet that are linked. The word doc has
fields that are link to cells in the excel spreadsheet. Everything works
fine until I try to email it to someone. The way the links are setup are as
follows:
Both the spreadsheet and the docs are going to live in a "Z: drive" on
someone's network. I mapped a "Z: drive" on my home network (Vista to W2K
machine) and setup the sheets. They work fine here but when I send them to
my buddy they do not have z:\directory\sub dir\sub dir\source . They have
10\100\100\100\directory\sub dir\sub dir\source.
My question is:
Is there a way to make the links point to "Z" and stay pointed.
Thanks
Larry C Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113446
Look for ASK field first before creating it.
Hi -
I have a macro that inserts 2 ASK fields at the top of an active document as
follows:
I would like to first look for the ASK fields first, and only add them if
they do not exist yet. Can someone help with the IF statement needed?
Sub AddFieldCodes()
' Used to add ASK field codes to an existing document, not initially created
using this template.
' Add ASK Reference Field Codes at start of document.
Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Name:=""
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
" ASK Name ""Name"" \d ""<Name>"" ", _
PreserveFormatting:=False
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
" ASK Type ""Type"" \d ""<Type>"" ", _
PreserveFormatting:=False
End Sub Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113442
Not printing correctly...
The code below is supposed to ask the user if they would like to print a PDF
of their document, then bring up the print dialog box with CUTEPDF already
selected. Then once they select to print, it waits until the document is
spooled until doing the next step. If not, it will skip it will ask if they
want to print a hard copy. If they select yes then it will bring up the
print dialog box from the CutePDF printer. I can't get the code to work as
it seems to be written here:
'START Save PDF
If MsgBox("Would you like to print a PDF of your proposal?", vbYesNo) =
vbYes Then
With Dialogs(wdDialogFilePrintSetup)
.Printer = "CutePDF Writer"
.DoNotSetAsSysDefault = True
.Execute
End With
ActiveDocument.PrintOut (Background = False)
End If
'END Save PDF
'START Print Proposal
If Response = MsgBox("Would you like to print your proposal?", vbYesNo)
= vbYes Then
Dialogs(wdDialogFilePrint).Show
PPSPrintForm.Show
ActiveDocument.PrintOut (Background = False)
Else
Application.Quit (wdDoNotSaveChanges)
End If
'END Print Proposal Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113441
Access denied error when trying to delete a file - Word 2003
I have developed a template that is used by greater than 100 users
that is used for a particular type of document.
To ensure consistent file naming, I have developed a routine that determines
a filename based upon the document variables for each file (called
SmartFName). I have tied this routine into FileSave.
The routine performs the following:
1. Checks to ensure that the document variables used for the file name are
set.
2. Determines the SmartFName based upon the document variables.
3. Compares the SmartFName to the existing filename.
4. If the same, saves the file.
5. If not the same, it prompts the user asking if the SmartFName should be
applied.
6. If No, it saves the file.
7. If Yes, it performs a ActiveDocument.SaveAs to the SmartFName.
8. It then prompts the user asking if the old file should be deleted.
9. If Yes, a Kill oldpath filename is performed.
It is at this point, an "Access Denied" error is generated sometimes.
Thanks in advance for all help.
--
Tim Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113436
Word VBA Errors
Hello,
I have a VB application which calls the templates stored on a network share.
These templates support wordbasic. Everything was fine untill Office 2003,
but when i upraded to Office 2007 the word templates have stopped working.
Whenever the VB application tries to open the file it throws an error "Sub or
Funcion not defined" and "Microsoft Visual Basic" written in the title bar.
I've also added the network share in the trusted locations. Can anybody help
me solve this issue please? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113431
VB Command Button Question
I've been having problems hiding and showing the command button in MS Word.
When the button is pressed it will bring up a form. The form has another
command "OK & CANCEL" and also "Input Field".
I was able to reduce the size of the Command Button to .0001 for printing,
but not able to bring it back to the original size after the document is
printed. (See Below)
Question: How can have the CommandButton1 show again without closing the
document and opening it again?
With ActiveDocument.CommandButton1
.Height = 0.0001
.Width = 0.0001
End With
MsgBox "Your document is now being printed..."
ActiveDocument.PrintOut
With ActiveDocument.CommandButton1
.Height = 25
.Width = 160
End With
Exit Sub
End Sub
Thank you for your help!
Tom Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113427
issue with creating template for letter
Hi,
I have a problem in regards to word template for office 03. I have a
template designed to generate a company letter. Like any normal letter, it
has date, sender, address, regarding, body of the letter, and signature of
the manager. So, when user runs the template, a userform comes up. They can
then fill out all empty textfields which are then placed into the word
document. This works so far. However, my problem here is about the body of
the letter. Since i use {DOCVARIABLE mybodytext} in the word document, all
the texts entered or typed in by user via userform is treated as a variable.
This is something i didn't anticipate or give it a thought when designing
this template. Today, i have one of my colleagues wanting to create a letter
to be sent to his client. (By the way, i use a normal text-box in the
userform that allows user to enter multiple lines) He put in some bullet
points to the text-box in the userform as if it was for a normal report.
After pressing the button "ok", all the DOCVARIABLE-s are replaced with
values from the textboxes and it worked. However, there is a problem with the
bullet points. It didn't look like bullet points at all. The other problem is
with the gap spacing between the previous line and the next line. Obviously,
he couldn't fix them individually with the spacing and bullet points as they
all are one variable.
I must have taken the wrong approach here. I wonder if there are any better
approaches that may help me out. Basically my aim is to create a template so
that any users who want to write letter to their client, can actually use it.
Your help is greatly appreciated
Thank you in advance Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113424
Find and use a user's template directory path
Hi -
I would like to automatically attach a template file named "AutoWork.dot"
when a user is ready to use it. The user has this file stored in their
template directory, wherever that may be. How do I write a macro that finds
a user's MS default template path (there a many users and this may vary
between users), then attaches this .DOT file to the active document?
Thanks so much,
Pia Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113423
Any way to insert .............. till end of line via shortcut ?
Hi,
is there a way to have a line completed till its end with dots
............... ? ( not exceeding to next line, nor too short). Number of
characters on the line can be variable, so inserting just a fixed number of
dots wouldn't be appropriate.
Any help ?
Word XP & Word 2k3
TIA
Phil Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113421
Macro to select ALL tables (with different styles) in a word docum
sorry if it is a repost(?)
How to select ALL the tables (with different Table styles) in a word
document (by exemple to apply a "table formatting macro" or a new table style
to all the tables in the document at once).
I cannot select all the tables at once using the Styles and Formatting pane
because the documents have several table with different table styles.
I would like to avoid scrolling in the document and hold the CTL key + click
in every tables.
I have looked for selecting all the tables using the the Find (F5) function
in word, but I found "tables" nowhere in the options list.
Is there is a solution with the Find function or/and with a Macro?
Not sure if I explain well, so ask me if you need further precisions.
Thanks Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113417
Hyperlink in clipboard for Outlook Email
Is it possible to create a hyperlink and place this in the clipboard
so you can paste it into an Outlook email. I know i can do something
like this
"<file:///E:\Profile\Desktop\dropbox\sharepoint.docx>"
And then after a return it will hyperlink. But i would like the link
and the text to be different. Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113414
Cannot access VBProject object
I wanted to remove a VBA Form in a Word template. The following is the code.
I have set the Word application property of "Trust Access from Visual Basic
Project", but it seems that the VBProject object I got is somehow invalid.
Dim wordApp As Microsoft.Office.Interop.Word.Application
Dim doc As Microsoft.Office.Interop.Word.Document
Dim vbProj As Microsoft.Vbe.Interop.VBProject
Dim name As String
wordApp = New Microsoft.Office.Interop.Word.Application
doc = wordApp.Documents.Open(FileName:="C:\\Temp\\Test.dot")
vbProj = doc.VBProject
name = vbProj.Name //This line throws exception Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113410
Renaming bookmarks when inserting file
I would like to be able to rename the bookmarks on a document that I am
inserting into a template new doc. The template has the abilitiy to add this
document many times and I will run sql statements to populate some of the
fields on the inserted file.
Let's say I'm inserting test1.doc which has 5 formfields, text1 - text5.
How can I rename these upon inserting the file?
That way I can maintain 1 insertable doc rather than having multiple
Thanks,
Bryan Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113397
Index
I want to index a book in word - and there are already hundreds of exisiting
index entries in the text, produced an older programm.
There are two forms (both nomal text in the file):
- <$Imainentry>
- <$mainetry;subentry>.
Can this be achieved in VBA? Replace these existing text fields with word
index fields {XE }?
Thanks for every answer/help!
Matthias Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113395
Need to Add reference fields to a blank document
I have a template with the following hidden reference field.
{ ASK MyField \* MergeFormat}
I use a {REF MyField \*MergeFormat} statement within my document to pull the
data where it needs to go. I have a macro that Selects ALL and then saves
all reference fields as regular text before the document is distributed
online. However, I would like to restore the ASK statements at the top of
the document in case further edits are needed.
So, what I would like to know is how to create a macro that automatically
inserts the ASK statement at the beginning of a document.
Thanks so much for any guidance with Word 2000 fields!!! Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113390
Extract data from Word Table
Hey all,
I have a large document with hundreds of word tables that I would like to
extract into Excel with VBA. The MSDN example I found doesn't work so I'm
not sure how to proceed.
I don't know the Word Object model at all so any pointers or URLs would be
greatly appreciated.
Thanks,
Cliff Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113387
Office 2007 Add-in Designer
There used to be an Add-In designer in Office XP ( 2002) which you
could quickly make add-in DLL's by choosing File -> New Project -> Add-
In Project. Is this possible in 2007 or is the only way to do this
through visual studio now? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113385
delimiter settings
recorder a macro no problem. when run it stops on delimiter screen. What can
be put in code to set delimiter ="," never been here befor. My recorded code
following
This is all in 2000 word.I tried all I can think of and my books don't show
this.
Thanks
Selection.Range.InsertDatabase Format:=0, Style:=0, LinkToSource:=False, _
Connection:="", SQLStatement:= _
"SELECT Name_of_Entry, Contact_Person, Address, CityState, Zip_ FROM
C:\Parade\ZZZ.txt WHERE ((Name_of_Entry IS NOT NULL ) AND (Contact_Person IS
NOT NULL ) AND (Address IS NOT NULL ) AND (CityState IS NOT NULL ) AND (Zip_
IS NOT NULL ))" _
& "", PasswordDocument:="", PasswordTemplate:="",
WritePasswordDocument _
:="", WritePasswordTemplate:="", DataSource:="C:\Parade\ZZZ.txt",
From:= _
-1, To:=-1, IncludeFields:=True
ChangeFileOpenDirectory "C:\Parade\"
ActiveDocument.SaveAs FileName:="Ztable.doc",
FileFormat:=wdFormatDocument _
, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False
CommandBars("Stop Recording").Visible = False
End Sub Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113383
Inserted Pictures
I have documents that were converted from WordPerfect to Word. I created a
macro the Resets the outline numbering, page setup and other things. A lot of
the documents have inserted pictures and AutoCad drawings in them. Is there a
way to over look these when the macro is running? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113376
Setting Cursor Position
How can I position the cursor at a certain bookmark upon opening a new
protected document?
Thanks,
Bryan Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113375
Table 1st col Insert Word
I want to insert
Dr^s (non breaking space)
as 1st word in Column 1 of a table (the rows already exist). I just want it
to run down the 1st column and insert the above word with a nonbreaking
space before the text already inserted? Is anyone able to help with VBA
please?
Much appreciated. Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113371
Word 2007 letter template - open saved document are missing vba code
I have build a template with some vba-code to handle userinput with at
userdefined
dialogbox. After the dialogbox is closed the data is placed in the
document.
I have also added a button to the ribbon, so the userdialogbox can be
showed again,
with the data from the document in the userdefined dialobox. It works
fine.
Then I save the document as xxxx.docm (document with macro).
Now the problem: When the document is open again the macrocode and
then button in the
ribbion is missing!
I have tried to add trusted locations where the template and the
document are saved,
(also remembered Subfolders) but that was not the solution. If the
document is saved
as Word 97-2003 format, it works as expected (is works fine). But why
is it a problem
with the Word 2007 format?
I will be very happy if someone can solve this problems for me. Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113367
Word's Dialog Boxes are too small!
Some dialog boxes in Word are too small to display sufficient information. Is
there some way to make them larger?
(Same goes for some Windows XP dialogs, too) Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113366
Delete default custom file properties?
My Office 2003 version of Word appears to contain the following UNWANTED
values in the Custom File Properties window. How do I clean these pesky
items out? The Delete button is greyed out for all of them!
Checked by
Client
Date completed
Department
Destination
Disposition
Division
Document Number
etc., etc. Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113365
mail merge macro or script
I have a mail merge document and need a macro or script that will go through
all the mail merge records and save each record as it's own document using
one of the mail merge fields as the document name. Is this possible? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113362
Self-deleting macro button?
I have a macrobutton embedded in a line of hidden 'instruction' text.
The macrobutton works fine - But the hidden instruction line is no longer
needed as soon as the macro executes. What syntax can I add to the macro
button's macro, that will delete the entire hidden line, macro button and
all, as the macrobutton executes? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113357
if chkbox is ticked then un-strikethrough textbox text
Hi, I want to make a word document into a form that I can both protect and
also allow users to input data into, but I don't know if I'm going about it
the right way.
I'm using the control toolbox to create several checkboxes and adjacent
textboxes on my document. I have put some default text into the control boxes
which I want to make strikethrough format out by default. I don't know how to
do this.
Essentially, I want to allow the users to select the checkbox beside the
text to unstrike it, thus enabling the text to be shown normally. So that the
user is picking specific clauses that they want to form part of their
contract.
I don't know where to put the code. For example, if I was using a userform
the code would be part of the form. In this case, is the code part of the
thisdocument object and if so what event should I use e.g. click, change,
gotfocus?
If my textbox is called txt1 and my checkbox is chk1 can you give me some
example code on how I do this.
Kind regards
Dylan Dawson Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113355
Normal.dot default
Everytime I open Word 2003, my toolbars, macros, etc. are changed. I have
saved a copy of the Normal.dot (the correct one) on my desktop and up until
now I have just closed all the programs and deleted the old Normal.dot and
replaced it with the copy of the desktop and it has worked just fine.
Somehow, ALL of the instances of Normal.dot have defaulted to an OLD version
and all of my toolbars, macros, and settings are gone. This is not the first
time this has happened, but no one is able to tell me why and how to stop
this from happening.
Thanks.
--
S Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113350
Replacing Nested Text
Hi there,
i wonder how fast the normal word replace function (Edit->Find/
Replace) is able to replace nested text in text boxes or tables. i
want to automatically do this for text in tables within text boxes
(Textbox->Table->TableCell->Text). the only approach i had so far is
to
- iterate through each Shape (and if it's a textbox)
- select the table within and
- replace the text
and this costs me a lot of time. the macro recorder function didn't
show me the exact find/replace method.
do you have any idea?
regards, matthias Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113342
document template
How do I lock certain bits of text in a new template i am making? And does
anyone know how to create a shaded field where users can insert text? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113339
showing only some parts of a document
I´m not sure how to explain my problem. I´m making a contract with different
paragraphs and parts in it. It is a general contract but it would be used to
many purposes. I would like it to be so that you can choose in the beginning
wich parts and paragraphs of the contract you want to use and it the document
would be automatically biuilt according to those wishes. Is this possible and
if it is, how? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113338
How to make it search from the beginning of the document?
Hi,
Somebody gave me the following code to search words in red in a
document:
With Selection.Find
.ClearFormatting
.Forward = True
.Wrap = wdFindStop
.Format = True
.Font.Color = wdColorRed
End With
While Selection.Find.Execute
MsgBox (Selection.Text)
Wend
May I know how to force it to seach from the beginning of a document?
Thanks.
Mike Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113336
Force Saving Document with New Name
I am opening a document with
Set DocB = Word.Documents.Open(DocA.Path & "\Intro.doc")
I would like the file to show as "Document1" (or whatever the next new
document would be) so that the user is forced to save it with a new
name.
Is this possible?
thanks,
dave Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113332
macro for displaying section field +1 digit?
The Section field, when added into a document, displays an arabic numeral
showing the section number where it resides.
What syntax would cause display of the section number, incremented by one
digit?
(ie, the Section field, if placed in section 2, displays a "2" but with this
new syntax, would display a "3"; if positioned in section 12 it would
display a "13", etc.) Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113327
"Probable VIRUS Detected" message
I create a very short macro for a particular form document and get this
message whenever I open the document. It is a very simple macro that turns
off the document protection when the user reaches the last Text form field.
How do I stop this from appearing? Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113326
removong 'blank' pages
hi, I have code that produces various documents.
Now, in the main, the documents are printed on a duplex printer and so
the document contains extra page breaks to ensure that certain pages
dont print on the reverse of the previous page (ie it inserts 2 page
breaks instead of 1)
However, sometimes i'll be printing on a single sided printer and as
such i end up getting a load of 'blank' pages (apart from the header
and footer).
Is tehre a way i can loop thru all pages in the doc and if there is
nothing in the main body of a page then it removes the page?
Thanks. Tag: Resize ActiveX Checkbox/Radiobutton Tag: 113318
Ok i'm hoping this is simple because I just can't figure it out. Is there
anyway to increase the size of the ActiveX controls in Word 2003 like how you
can with the From buttons?