|
protecting Docvariables in a word document
Hi,
What I'm trying to do is define variables in word so that A user changes it
in one place and the doc is updated automatically. For example, doc date,
author, revision #. I defined variables in the preferences area and then put
those variables in multiple places in the word doc (title page, header,
footer). Works great, except that it is not protected in the word doc.
Issue ...
|
1 |
12/29/2008 9:57:02 PM |
|
Auto populate an area of a template based on checkbox selection
I have two separate areas of a template that asks for the same infomation.
There are 8 Regions that have to be selected and there can be multiple
selections if applicable. In the first area I have checkboxes for selection.
Is there a way to have the name of the region (caption) automatically appear
in the second section when the checkbox is selected in the first?
Hope this is clear. Th...
|
11 |
12/29/2008 8:10:00 PM |
|
Refactoring from VBA to C#
Hi all,
I have a C# console app that I'm building to automate some Word
functionality. I would like to add code to that app that will conditionally
color some table cell backgrounds based on the text within the cell.
My coding experience is generally limited, especially when trying to convert
from one language to another.
That said, I have the following VBA code that works fine wit...
|
1 |
12/29/2008 6:31:02 PM |
|
how to open a specific file with button on form
Hi
I am trying to make a navigation menu using form, where a user clicks a
button to open a file, e.g. if button1 is pressed open fileA.doc, if button2
is pressed, open fileB.doc etc..
these buttons are individual, each file name is associated with each button.
anyone can help?
cheers....
|
2 |
12/29/2008 2:33:12 PM |
|
Saving TextBox value as a filename in a given location
hi
i managed to write a code to save a template file name using whatever the
user typed in textbox, but i want to find out how to save that file in
another folder, e.g. on a network drive.
e.g if user types Test in TextBox1, and press OK button, the active file is
saved as 'Test' template, but i want to save it as word document .doc file
not as template and also save it in another fo...
|
11 |
12/29/2008 1:11:00 PM |
|
Disable AutoRecover
Hello,
I'm doing a mail merge programmatically (c#) with word 2007. When an error
occurs, Word tries to recover the lost file and requires human interaction. I
would likke to disable the autorecover option of word through c# code.
I found out that with Word 2003 and VBA you could do
Application.AutoRecover.Enabled = False
Can I do something like that with c# and Word 2007?
Thanks...
|
3 |
12/29/2008 1:02:10 PM |
|
Navigate to the End of a Word in One Key Stroke
Version of Word: 2003. Can someone write a macro that will do the following.
When the cursor is in any part of a word, can it be made to navigate to the
last character of that word. For example: "The squirrels runs up the tree."
As I edit the document after having typed everything, I navigate using the
Ctrl + > and I end up at the word "run" instead of the "s" on squirrels. This
may ...
|
2 |
12/29/2008 7:07:30 AM |
|
Looping through the BuildingBlocks collection
I'm trying to convert some macro code from our Word 2003 templates to
work with Word 2007, but am confused by the behaviour of the
BuildingBlocks collection. Why is it that I cannot loop through the
collection with a For Each..Next structure? The following fragment
throws error #438 when it reaches the "For Each..." line, stating
"Object doesn't support this property or method."
Sub Test...
|
3 |
12/28/2008 8:03:55 PM |
|
option button
I can't seem to get this working in Office 2007? Is the solution the same,
or chas it changed? I want to do the same thing - have groups of buttons in
a single document.
Thanks...
|
2 |
12/28/2008 4:15:59 AM |
|
how to do calculations on a word page
hello everyone
my work involves writing news scripts. And I need to put the length of
soundbites on the page like so
sound bite: 00:02:30
Each newsscript is a section.
there may be two to three sound bites on every page.
How do I add these (hh:mm:ss) figures and give the total in the header or
footer.
SHould they be bookmarks along with a field.
any help will be appreciated.
t...
|
3 |
12/28/2008 1:59:07 AM |
|
Counting style usage
I am trying to write code that will count the number of times a style
is used in a document.
The following code works some of the time but results in an endless
loop under some circumstances (the i < 1000 eventually exits the loop
if this happens). I have determined that the endless loop will occur
if the found text is within a table cell, is the last paragraph in the
cell and there is ...
|
11 |
12/27/2008 10:40:45 PM |
|
Advanced string comparison
Hi,
I'm writing my own proofreading tool, because some Portuguese orthographic
rules are going to change in January 1st 2k9, and it seems Microsoft will
not distribute a new dictionary for old versions of Word (just for 2007). So
I need to compare words (simple words and compound words - two or more
words with hyphens).
I'm having some difficulty for performing the string co...
|
4 |
12/27/2008 1:26:46 PM |
|
Greg: ScreenUpdating
Hi Greg,
Just in case you want to discuss further, I've started a new thread rather
than continuing off-topic in the other.
Essentially, when you run a macro, you are doing a series of operations as
though they were done one by one through the UI. Most of these operations
affect the contents of the screen display and, as part of each action, the
screen display is rebuilt. This is rel...
|
5 |
12/27/2008 11:20:09 AM |
|
What is best practice for using IRibbonControl callbacks?
When using VB macros, one type of signature for a ribbon control callback is:
GetVisible(ByRef rctlRibbon As IRibbonControl, ByRef rboolVisible)
Is it best to use the reference to IRibbonControl to invalidate it
immediately, or,
if the callback occurs within a block code that has
Application.ScreenUpdating = False, will the IRibbonControl.Invalidate method
by popped from the stack?
Wha...
|
6 |
12/27/2008 11:18:44 AM |
|
Concordance, Macro for
I am making a series of concordances for articles I am translating from
Italian. I have a concordance with hundreds of words, some with multiple
occurrences others with only one.
Can someone write a macro that would allow me to highlight all entries in my
concordance that contain 3 or more occurrences in the document?
Any assistance would be much appreciated....
|
2 |
12/27/2008 1:35:21 AM |
|
Print contents of a msgbox to a new document
Dear Experts:
Below macro lists all heading 1 paragraphs in a msgbox along with the
corresponding sections. I would like the contents of the MsgBox to be
added/transferred/printed to a new document as well. How is this
achieved?
Help is appreciated. Thank you very much in advance. Regards, Andreas
Sub List_Heading1_Text()
Dim opara As Paragraph
Dim strMsg As String
Dim r...
|
3 |
12/26/2008 9:31:48 PM |
|
Check whether built-in heading 1 is outline numbered
Dear Experts:
Below code searches for the first occurrence of the built-in
paragraph style heading 1.
Is it also possible to check whether the heading 1 level is outline
numbered, such as
"1 Analysis" ?
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Sub SearchStyleHeading1
Set rng = ActiveDocument.range
With rng.Find
.Style = Acti...
|
3 |
12/26/2008 9:18:41 PM |
|
Access the Paste Options Menu from the Keyboard - w/o the Mouse
Version of Word 2003: I would like to access the paste options menu directly
from the keyboard w/o using the past. The past options menu comes up whenever
one pastes within Word using ctrl-v. Having to access this from the mouse
chews up valuable time. Word 2007 has remedied this problem with a shortcut,
which I cannot recall at the moment.
Any suggestions or macros would be most apprec...
|
4 |
12/26/2008 7:37:00 PM |
|
Damaged document after saving...
Hello,
After editing and transfering edited data from UserForm to the document I
print and save the document. Printed document is normal and I have no
problem with it but I can not open the saved document and I get the following
error...
=====
The Office Open.XML file (Paarsa)(20081224100915).doc cannot be opened
because there are problems with the contents. Ok & Details <<&l...
|
2 |
12/26/2008 12:01:05 PM |
|
Creating a formatted list box in a form
I am trying to add a list box in a Word 2000 form that shows the options Red,
Amber and Green that when the user selects one of the options the colour of
the selection will also come up. i.e. if they choose Red, then the word
shows as Red.
I have tried adding a list box and an Active X-box which is what I beleive I
need to use but have no idea about VB editor. Can anyone help
Thanks
...
|
4 |
12/26/2008 10:27:52 AM |
|
Word 2007 ContentControlOnexit bug needs focus developer tab
L.s,
I Bookmarkt my contentcontrols and use the content with REF fields in my
document. It works fine (when you bookmark the right way). But a need to
manualy update fields.
Now I want the fields to update automaticly when I leave the contentcontrol
field. I found the contentControlOnexit trigger, looks nice simple macro to
update all fields when I leave the contentcontrol.
But ...
|
4 |
12/25/2008 2:41:09 PM |
|
Looking for a Better Way?
Today I wrote some code to sequential number some Avery 5267 labels. My
template table has 7 columns and 20 rows (the Avery 5267 layout) for 80
labels. I knew that if I need more than 80 labels in the sequence then I
would need additional tables. I had a real tough time figuring out how many
tables I would actually need.
E.g. 81 + labels needs two tables, 161+ needs 3, etc.
Taking th...
|
7 |
12/24/2008 9:18:34 PM |
|
get system folder path
Hi,
I'm looking for a property that matches the Application
data\Microsoft\Proof, that is, the path of the folder that contains the
proofing tools. I'm using the Options.DefaultFilePath(wdAutoRecoverPath)
property and manipulating the string, getting its parent folder and searching
for the Proof folder inside it, but it is not exaclty the best procedure I
guess ;-)
Best regards,
...
|
2 |
12/24/2008 4:33:05 PM |
|
Save in three locations
I've been using Grahm Mayor's excellent vba to save in two locations. Now I
need to save in three locations and need to tweak the original code.
My efforts need some refinement!
Any suggestions would be greatly appreciated.
Cheers
Mike
Sub backup2()
'
' backup2 Macro
'
'
Dim strFileA As String
Dim strFileB As String
Dim strFileC As String
Dim strFileD As String
ActiveDo...
|
8 |
12/24/2008 8:09:13 AM |
|
cannot hide userform
Hi,
i want to hide the userform when ok button is pressed and all the code
processed.
i added this code at the end of OK button
me.hide
it gives 'Run-Time error '4198':
Command failed'
that comes up when i open the template containing the form, but if i run the
form again from the VBA editor, it hides it, but not opening the document for
the first time.
anyone got any ide...
|
5 |
12/24/2008 5:22:21 AM |