Deploying Templates
I have a batch file that I run to distribute templates throughout the company
as a whole. I created a digital certificate which is used by each; each
template has the digital certioficate associated with it. All users security
level are set at 'Medium'. I have Office 2003 users as well as Office 2007
users. Users are still receiving errors on initial startup of Word; as well
as constantly being asked ot enable macros. They should never be prompted.
What do I change to ensure that all users are not receiving these messages? Tag: HOT NEWS FROM MICROSOFT....... Tag: 115240
Controling Custom Dialog Box - Word 2000
Hi,
I'm working on a custom dialog box. I'm in the beginning stages and am
running into a problem.
I have 2 frames with option buttons and one check box.
The user has to make a selection in the first frame. If the user selects
the 4th button the second frame and the check box become enabled. They can
choose an option button from the 2nd frame OR the check box.
They must choose an option button in the second frame OR the check box.
If they choose an option button or the check box ... no problem.
Right now when they hit OK and leave both (2nd frame and check box)
unselected the dialog box closes. How do i keep the dialog box from closing
and keep the option button in the first frame selected?
Hope this makes sense.
jbc Tag: HOT NEWS FROM MICROSOFT....... Tag: 115237
figure out cursor location in word 03
Hi,
I was wondering if anyone might be able to help me with the following
problem that i'm having.
Is there a way of figuring out where the cursor is in a document?
The reason for that is I have a code that would insert a new Section in the
document report.
Here is the code
' Insert a heading for the new section.
Selection.Style = ActiveDocument.Styles("Section Heading 1")
' Insert the heading's text based on InputBox entry.
' Add a paragraph break to return to "Normal" text.
Selection.InsertBreak Type:=wdPageBreak
Selection.TypeText Text:=InputBox("Please enter section heading:", "Enter
Section Heading")
Selection.TypeParagraph
This will work if the cursor is on the newline. It would place another
section (e.g. Section 2) on the next page. However, the problem arises when
the cursor is not on the newline.
For example,
Section 1. Water Sewage
Blah blah
Classification report
If the user by accident leaves the cursor at the end of the word "report"
and select the macro to insert a new section, it'd be stuffed up.
Instead of getting Section 2 to show on the next page, i'd get as follows:
Section 1. Water Sewage
Blah blah
Section 2. Classification report
--------- page break -------
Section 3. Reconciliation
Not sure if anyone would like to throw in some ideas here. What i come up
with is if we could find out where the cursor is and can check to see if
it's at the newline or not.
Your help'd be greatly appreciated.
Thank you in advance
url:http://www.ureader.com/gp/1022-1.aspx Tag: HOT NEWS FROM MICROSOFT....... Tag: 115235
figure out cursor location in word 03
Hi,
I was wondering if anyone might be able to help me with the following
problem that i'm having.
Is there a way of figuring out where the cursor is in a document?
The reason for that is I have a code that would insert a new Section in the
document report.
Here is the code
' Insert a heading for the new section.
Selection.Style = ActiveDocument.Styles("Section Heading 1")
' Insert the heading's text based on InputBox entry.
' Add a paragraph break to return to "Normal" text.
Selection.InsertBreak Type:=wdPageBreak
Selection.TypeText Text:=InputBox("Please enter section heading:", "Enter
Section Heading")
Selection.TypeParagraph
This will work if the cursor is on the newline. It would place another
section (e.g. Section 2) on the next page. However, the problem arises when
the cursor is not on the newline.
For example,
Section 1. Water Sewage
Blah blah
Classification report
If the user by accident leaves the cursor at the end of the word "report"
and select the macro to insert a new section, it'd be stuffed up.
Instead of getting Section 2 to show on the next page, i'd get as follows:
Section 1. Water Sewage
Blah blah
Section 2. Classification report
--------- page break -------
Section 3. Reconciliation
Not sure if anyone would like to throw in some ideas here. What i come up
with is if we could find out where the cursor is and can check to see if
it's at the newline or not.
Your help'd be greatly appreciated.
Thank you in advance
url:http://www.ureader.com/gp/1022-1.aspx Tag: HOT NEWS FROM MICROSOFT....... Tag: 115234
MIME Types
i have a windows application that diaplays a word document streamin an
axwebbrowser. I am using VS 2005 and Microsoft office 2003. The document
stream that is sent to the axwebbrowser uses the mime type :
"application/msword". However i have noticed that i am only able to open
files this way on my system. On a system that uses Office 2000 or 2007, i am
unable to do this. Please help.
Note: Programming language: C# Tag: HOT NEWS FROM MICROSOFT....... Tag: 115233
Inserting AutoText Entries from another Template
I have created a template containing AutoText entries.
How can I create a new blank document based upon Normal.DOT and insert the
AutoText entries from my custom template - without referencing a filename
path to my custom template, as its location is likely to change. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115231
Does anyone know why EZPhoto keeps showing up in Word?
I cannot find EZP when searching my computer and yet it keeping appearing in
Word and asks, do I want to keep it. It's a pain the constantly have to go
to Tools, Customize to drag it out of my toolbar. Help! Tag: HOT NEWS FROM MICROSOFT....... Tag: 115228
Marco/Hyperlink
Is there a way to make a Marco a hyperlink or button within a document in
Micosoft Word?
Or a hyperlink to follow a menu command.
My goal is to have a option (like a hyperlink or marco) within my document
to print only the page I am on in my document. For example, if someone one
wanted to print Section J, which my be several pages, there would be a
hyperlink function that would print only that scetion. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115221
Unwanted Spellcheck Dialog
Hi All...
I'm trying to use Office 2007's (and 2003...) Word to spellcheck a field on
a web form. I'm using javascript running in the browser on a client machine.
I'm using the following code...
var word = new ActiveXObject("Word.Application");
word.Visible = false;
word.WindowState = 2;
word.DisplayAlerts = false;
var doc = word.Documents.Add();
doc.Content = 'Hello World, I can spel.';
doc.CheckSpelling();
var count = doc.SpellingErrors.Count;
When it runs, the call to CheckSpelling seems to hang. Upon investigation,
I find a dialog under all of my other windows offering to help resolve the
spelling error - a spellcheck dialog. I dont want that dialog - I'd rather
resolve the spelling issues programmatically from within my javascript. How
do I keep that dialog from popping up?
Many thanks. -- Curt Tag: HOT NEWS FROM MICROSOFT....... Tag: 115218
showing two modal windows in Word 2000 and before
While displaying a form modally, I need to be able to open another form
modally on top of the first. This works fine in Word 2003 and up, but in 2000
and before, it causes a real problem that will make the 2nd form either not
display, or go into a loop, or give an error about modal forms.
Does anyone know a way around this?
--
Thanks,
Gary Tag: HOT NEWS FROM MICROSOFT....... Tag: 115217
email document
Firstly apologies, there are hundreds of references to doing this in this
group but I can't find one that does what I want.
I want to be able too put a command button on and Excel 2003 document and
use that that paste a copy of the document into an email and send it to 1
recepient & several CC recepients. I've tried all sort of code variations
found in this forum but none do what I want. Help please.
Mike Tag: HOT NEWS FROM MICROSOFT....... Tag: 115212
DISPLAYING THE DAYS SINCE AN EVENT
I need to be able to display the number of days since an event. I would like
to have the document creator input a date, then have a display that shows the
number of days since that date at print. Any suggestions?
Thanks! Tag: HOT NEWS FROM MICROSOFT....... Tag: 115208
Page number fields issue
I've got a Word 2003 template that I have deployed to four of our locations.
Each office has its own location for this template. I have a person at one
office who is complaining that her page numbering is off. The document is 26
pages but the ToC lists 32. I completely redid the document in a template
from my location and it worked fine. I applied the template that they are
using in that office and it worked fine. But when she applied their template
at her location, the ToC listed 27 pages instead of 26. The document works
fine at our other locations. I had her try it on another machine there and
she got the same results. I have no idea what could be happening. Any ideas? Tag: HOT NEWS FROM MICROSOFT....... Tag: 115201
Help debugging macro
Hi there,
I have created a macro that looks in a folder specified by the user,
does a search in the Word documents in said folder, then moves some
data to Excel.
I am stuck at this code:
For i = 1 To fs.FoundFiles.Count
currentFile = fs.FoundFiles.Item(i)
' My code here...
Next i
When I run tha macro in debug mode, currentFile takes on the name of
the first file in the folder (in this case, c:\temp\CCPS6970.doc), but
the rest of the code does not run properly, because the document is
not opening up, and "currentFile.Open" does not seem to be the proper
syntax.
I don't want to post the entire code, since it is too long, but if you
deem it necessary to help me, I'll gladly do it.
Thanks for your input.
Carlos Tag: HOT NEWS FROM MICROSOFT....... Tag: 115194
Content controls
I have added a Building Block content control to a template that displays a
list of building blocks in the template. I want, in code, to be able to set
the content to a particular building block. I can do it easily enough in the
document by choosing the one I want from the list. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115191
Static Date code for macro
Hi,
I have been asked to modify one of our Word Macros so that the date
stays static. Currently we are using
{ DATE \@ "MMMM d, yyyy" \*MERGEFORMAT }
This is fine but when ever the document is opened again the date
changes to the current date and not the one that was supposed to be
for the Originating Date..
Could someone perhaps point me to the right place to get this
answered...
PS not a Macro or VBA expert by any means but do have scripting under
my belt...
Cheers an TIA
Ron Tag: HOT NEWS FROM MICROSOFT....... Tag: 115188
Compiling a template ('.dot') into a '.wll' add-in
Hello,
Does anybody know the compiler to use for creating
a '.wll' add-in for Microsoft Word from a template file ('.dot') ?
Many many thanks! Tag: HOT NEWS FROM MICROSOFT....... Tag: 115184
Generate doc in MHT format or in simple htmlformat
Hi im looking for solutuion to move default indent (1,27cm) for bullet list
to left. Here is some example (test.doc file). I cant move the first indent
:( in word 2003 ( in 2007 help text-indent from css..). Any idea how to move
it (mht or html format only)?
Thx a lot
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 11 (filtered)">
</head>
<body lang=CS>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo2;
tab-stops: list .5in"><![if !supportLists]><span style='font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]>Tabs problem.</p>
</body>
</html> Tag: HOT NEWS FROM MICROSOFT....... Tag: 115183
Create AutoText Entry from a Variable
I want to create a AutoText entry named; "UserProfile"
And it's value to be the result of; VBA.Environ$("USERPROFILE")
How can I accomplish this using VBA? Tag: HOT NEWS FROM MICROSOFT....... Tag: 115170
Constants corresponding to DocumentFormat for SaveAs
Hello all,
In a Scripting Guy's script, I found the fellowing
http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec04/
hey1222.mspx
'
Const wdFormatText = 2
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("c:\scripts\mylog.doc")
objDoc.SaveAs "c:\scripts\mylog.txt", wdFormatText
objWord.Quit
'
My question is: Where can I find the documentation regarding the
constants the SaveAs method expects (the value of wdFormatText)?
Note: What I'm trying to do is to script the conversion of a lot of files
from word to LaTeX using word2tex
http://www.chikrii.com/products/word2tex/dl/
but I don't know what numerical constant that corresponds to the .tex
format. I will use for this an other Scripting Guy's script
http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr05/
hey0401.mspx
Thanks in advance
--
Christophe Tag: HOT NEWS FROM MICROSOFT....... Tag: 115165
How to set the sequence of movements of the "tab" key
Hi,
I have put a number of textboxes on an userform. When I move around
the textboxes by pressing the "tab" key, the sequence of moving from
one textbox to another is not what I want. Can I change the sequence
of movements of the "tab" key?
Mike Tag: HOT NEWS FROM MICROSOFT....... Tag: 115163
Creating XLST / Transform File
I'm attempting to use MS Word 2007 to open an XML file - generated by
InfoPath 2007 - and then apply a transform to get the data in the format I
want it, and be able to modify it within MS Word 2007.
Can I actually create the "transform" (.xls) file within MS Word 2007? Can
someone recommend a guide to create the transform?
Thanks! Tag: HOT NEWS FROM MICROSOFT....... Tag: 115158
Alot of Content Controls in a VSTO Word solution causes CPU max ou
I am trying to develop a Word 2007 VSTO solution which contains about 1000
content controls. This sounds like a lot but it is a fairly simple solution
with just a lot of repeating data.
After deploying the solution I open the document and click inside one of the
content controls which causes Word to max out the CPU while it does
"something". I wish I knew what the something was so I could fix it. (My
guess is that it is binding all the controls but it should not take that long
on a superfast computer.) Note that after first click, the document seems to
work fine -- navigating to other controls etc. and no CPU problem.
This problem is reproducible by simply creating a new VSTO Word 2007
document solution and adding a Plain Text content control and copy/pasting it
down in the document 1000 times. Then deploy it. You don't even need to do
anything in the customization (add events etc.), just deploy as-is. Below
are the results I have seen which shows that the problem gets exponentially
worse:
600 Controls (25 pages)
Response: 11 seconds
900 Controls (38 pages)
Response: 35 seconds
1200 Controls (50 pages)
Response: 1 min 20 seconds
I would really like to be able to develop this as a Word solution so if
somebody has any info on this at all it would be much appreciated.
(Please don't respond and tell me to do an InfoPath solution.)
Thanks alot,
jbstrive Tag: HOT NEWS FROM MICROSOFT....... Tag: 115151
Can I make a label blink?
Hi,
I put a label on an useform. Can I make the words on the label blink
regularly? Thanks.
Mike Tag: HOT NEWS FROM MICROSOFT....... Tag: 115149
Apply "Space Before 18 pt" on all the paragraph immediately following
Dear Experts,
I would like to achieve the following using Word VBA:
I would like to apply an "18 pt space before" to the paragraph
immediately following a table.
For example:
Table cell Table cell Table cell
Table cell Table cell Table cell
Table cell Table cell Table cell
Paragraph immediately following the table (spacing before: 18 pt)
The macro should loop through the document and apply this to all
occurrences.
Help is much appreciated. Thank you very much in advance. Regards,
Andreas Tag: HOT NEWS FROM MICROSOFT....... Tag: 115143
Apply another font to all text boxes within a canvas or to grouped
Dear Experts:
Below macro changes all text within text boxes to "arial ,bold, Size
8". So far, so good. This macro is working
a. But I also got text boxes within canvasses. How do I have to
change the code so that text boxes within canvases also get their font
changed to "Arial Bold 8"?
b. I also got grouped text boxes in my document. How do I have to
change the code so that grouped text boxes also get their font changed
to "Arial Bold 8"?
Help is much appreciated. Thank you very much in advance. Regards,
Andreas
Sub ApplyFontToTextBoxes()
Dim shp As Word.Shape
For Each shp In ActiveDocument.Shapes
With shp.TextFrame
If .HasText Then
.TextRange.Font.Name = "Arial"
.TextRange.Font.Size = 8
.TextRange.Bold = True
End If
End With
Next shp
End Sub Tag: HOT NEWS FROM MICROSOFT....... Tag: 115142
Reference Books
Since the GUI in Word 2007 is drastically different than that of Word 2003,
I was wondering whether there's a book that described the differences. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115140
VBA - Word 2002 form | auto-SUM function for bookmarked table cell
I've created a protected Word 2002 form that allows users to enter data into
text fields. This form will then be printed out and turned in.
I want to SUM 2-3 table cells that are bookmarked income_1, income_2, etc...
and display the result in a TOTAL cell below the values.
I can use a Word SUM Function to SUM the bookmarked values, but I have to
update that manually. This form is for others, so I would like the SUM
function to happen automatically.
Is there VBA code to automatically SUM the values in the cells bookmarked
income_1, income_2, etc...? And display it in another cell? I thought maybe
it could be a BookMark-Change event that will fire the Macro. Or maybe I
could put a button in the form that says "Calculate" and then that would fire
the manual "update" function via VBA code.
I hope you understand what I am asking. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115137
VBA - totally disable Enter Key in Word Form? Keypreview in Word?
FIRST, I've read the MS KB article on how to insert 4 macros into a word form
to make the enter key act as a tab, and that is not the answer I need. I
want to keep the conditional formatting in my data-entry table cells in my
Word form.
I see a lot of questions that ask this, but none that seem to ask/answer
this specific question. I want to totally disable the use of the Enter key
in my Word form, NOT try to use it as TAB.
I have created a form in Word 2002, which will be a template that users can
use to create a new form they can fill out. I am using EXACT row heights,
and the form is ready to go. However, I don't want the user to be able to
press the ENTER key in the form because it creates a new line, and I'm
working with NOVICE users, so I don't want ANYTHING to be confusing at all
(or the work won't get done!). So, I want to totally disable ENTER key use
via a Word function or VBA, so that nothing happens when they press it, maybe
just a Message-Box telling them that ENTER is disabled (they can navigate by
TAB and MOUSE).
Surely this is possible, especially in VBA code. Does Word have a
Keypreview property that I can change? Set KeyValue=0, or something? When
the doc opens, a Macro runs that disables the enter key by setting its value
to 0?
If you can help me with this, I'd appreciate it. A reading of many
discussion threads got me close to the answer, but doesn't have my
situational context. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115136
Character Limits and Macro Spell Check
I have a document with forms in it, and there are a few sections where I have
to limit the number of characters. So I inserted a Legacy Form Field text
box and then limited the characters through properties. However, when I try
to run a spell check macro, it is spell checking all of my other form fields
(these are RichText content controls), except for this one. I tried
inserting a RichText content control into the Legacy Form Field, but that
wouldn't work either. I just need to limit the characters people are typing
in this section and then spell check. To be honest, I don't even care if
it's protected or not. I've tried this macro:
Sub SCForm()
ActiveDocument.Unprotect
Selection.WholeStory
Selection.LanguageID = wdEnglishUS
ActiveDocument.CheckSpelling
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End Sub
And this one:
Sub FormsSpellCheck()
' If document is protected, Unprotect it.
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect Password:="not2day"
End If
' Set the language for the document.
Selection.WholeStory
Selection.LanguageID = wdEnglishUS
' Perform Spelling/Grammar check.
If Options.CheckGrammarWithSpelling = True Then
ActiveDocument.CheckGrammar
Else
ActiveDocument.CheckSpelling
End If
' ReProtect the document.
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
End Sub
The same thing happens. It checks everything but the character limiting
one. I also tried the one recommended on the MVP, and I couldn't get that
one to work at all. I wasn't quite sure what to copy/paste and what to
delete from that huge section.
Thanks in advance. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115133
Mouse Wheel
I have a user form with a multipage tab. Some of the tabs in the userform
have vertical scroll bars with a hight up to 1500. The user can use the
scroll control to move up and down. I have one user who wants to use the
wheel on the mouse to move up or down.
I cannot find any reference to the mouse wheel.
Does anyone know if this is possible? I would appreciate any help you can
offer.
Thank you,
SoCal Rick Tag: HOT NEWS FROM MICROSOFT....... Tag: 115132
How do I calculate time in form fields?
I have a user form that users enter the time they began a project and the
time they end a project. I need it to calculate hours and minutes. I'll
admit to being a "newbie" on fill forms, so I can use any help I can get!
Thank you! Tag: HOT NEWS FROM MICROSOFT....... Tag: 115128
save file wihout macros
I have a template that generates a standard letter for a user based on
inputs. The macros are used to generate the correct text given a users
input. The template works well. However, sometimes we will need to access
the document later on. I do not want the users to run the macros again. Is
there a way to strip the macros out of it and just save the file? My code
ends with:
If Response = vbYes Then
date2 = Format(Now, "MM-d-yyyy")
filetypename1 = strfilename & " " & date2
ChangeFileOpenDirectory "J:\PIH\ENGINEER\CFP\"
MsgBox filetypename1, vbOKOnly, "File name would be: "
ActiveDocument.SaveAs FileName:=filetypename1,
FileFormat:=wdFormatDocument, AddToRecentFiles:=True
End If
Any help would be appreciated! Tag: HOT NEWS FROM MICROSOFT....... Tag: 115123
Set Focus and Incorrect Dates
I'm having a problem with getting SetFocus to work and with 1/1/2008 being
recognized as later then 12/31/2007. I have listed the code below. (Sorry
this is so long).
It originally had a Cancel = True on the Event but I was asked to remove it.
The reason being if the txtBenefitPeriodEndDate is before the txt
BenefitPeriodBeginDate but it's the begin date that was entered incorrectly
then the user has to enter a date in the txtBenefitPeriodEndDate before it
will allow them to get back to the txtBenefitPeriodBeginDate.
The two sets of dates I have work together. They are:
txtBenefitPeriodStartDate
txtBenefitPeriodEndDate (must be later then txtBenefitPeriodStartDate)
txtHRAStartDate (must be later or equal to txtBenefitPeriodStartDate)
txtHRAEndDate (must be later then txtHRAStartDate and equal to the
txtBenefitPeriodEndDate)
Since they do work together I just want to remove the text from
txtBenefitEndDate and keep the cursor there because if it moves to
txtHRAStartDate then I get that message if I click into
txtBenefitPeriodStartDate.
Here is the code for txtBenefitPeriodEndDate and txtHRAStartDate:
Private Sub txtBenefitPeriodEndDate_Exit(ByVal Cancel As
MSForms.ReturnBoolean)
' 5.) Benefit Period End Date must be greater then 4.)
'Benefit Period Start Date.
If txtBenefitPeriodEndDate.Value < txtBenefitPeriodStartDate.Value Then
MsgBox "The Benefit Period End Date must be" _
& vbCrLf & "after the Benefit Period Start Date."
txtBenefitPeriodEndDate = Null
txtBenefitPeriodEndDate.SetFocus
End If
End Sub
Private Sub txtHRAStartDate_Exit(ByVal Cancel As MSForms.ReturnBoolean)
' 6.) HRA Start Date must be later or equal to 4.) Benefit Period Start Date
If txtHRAStartDate.Value < txtBenefitPeriodStartDate Then
MsgBox "The HRA Start Date must be later or" _
& vbCrLf & "equal to the Benefit Period Start Date"
txtHRAStartDate.Value = Null
txtHRAStartDate.SetFocus
End If
End Sub
I am just beginning to learn and am very confused why SetFocus doesn't seem
to work. It seems to work fine if I want it to go in a forward motion but if
I try to get it to stay where it is or go backwards it just doesn't work.
Also, the dates. It works if 01/01/2008 (txtBenefitPeriodEndDate) is before
01/02/2008 (txtBenefitPeriodStartDate) but not if 12/31/2007 is prior to
01/01/2008. Any help I can get is greatly appreciated. Thanks. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115118
Word 2007 Color Scheme
I can't find a way to switch color schemes using VBA in Word 2007. I know
you can apply a theme but i only want the colour scheme. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115115
delete line containing a certain text string
I receive files containing many lines starting with the word 'Table' and
ending with the string '== =='. These are interspersed with a few lines also
beginning with 'Table' but ending with various different strings. I want to
delete the lines endiing '== ==', leaving only the others.
Each line ends with a paragraph mark (after the strings mentioned above.)
I've tried to do this with the Help available in Word and the advice given
in this discussion group but so far failed. Can anybody help?
--
Terry Sycamore Tag: HOT NEWS FROM MICROSOFT....... Tag: 115102
Blind print out of pages
I am to build a template for users to use and what it is to have is a button
that prints our specific sections of text. Basically, a user locates a
heading in the document and then clicks on the button and the code in the
button has to figure out how many pages are under that heading and print
them. How would I code something like that? Tag: HOT NEWS FROM MICROSOFT....... Tag: 115100
HELP! Text Form Fields values disappear on print
I have a word document with over 400 text form fields. The fields are filled
in through a user control. When I print preview the document, it looks fine.
When I print it, the first thing that happens is all of the values in the
text form fields disappear. Any ideas would be greatly appreciated.
Thank you,
SoCal Rick Tag: HOT NEWS FROM MICROSOFT....... Tag: 115093
Filtering Columns in Word?
Hi,
Iâ??m trying to implement something similar to AutoFilter in Excel. I have
several tables in a document. Two of the columns in each table are called
â??Service Descriptionâ?? and â??Type of inspectionâ?? respectively. Since there are
only three Types of inspection, a simplified version of those two columns
could look as follows:
â??Service Descriptionâ?? â??Type of Inspectionâ??
Description1 C1
Description2 C1
Description3 HGP
Description4 HGP
Description5 MI
Description6 MI
Let's suppose that every table has something similar to what's shown above.
What I would like to accomplish is that through the click of a button or a
macrobutton field or whichever you consider is the most appropriate event
handler, every table in the document gets filtered based on the Type of
Inspection.
I was thinking about having three macrobutton fields, called "CI", "HGP" and
"MI", so that upon double-clicking "CI" for example, every table in the
document hides/unhides the appropriate rows. (i.e it only shows the rows that
correspond to a CI Inpection Type).
Is there a way to accomplish this? How can I refer to each table in a
document? and moreover, How can I select the appropriate range to hide it
based on the clicked button?
Thank you,
Juan Tag: HOT NEWS FROM MICROSOFT....... Tag: 115087
Word Macro for Printing Sections
Hello,
We have a form letter which is 2 pages. We do a mail merge from an
Excel sheet. The mail merge creates a new word document with all of
the form letters addressed to the different addressees. It appears
that Word turns each set of pages into a section. This is fine. We
then fax these to the addressees using our fax printer. I have created
a macro that prints each section as an individual document which then
gets faxed to the customer. The problem is the number of sections is a
variable. One week it may be 90 the next it may be 100. The macro I
created has 140 print sections in it. This works fine until the last
section. Because the macro has 140 sections the last fax has not only
the 2 pages it should have but then it back tracks and adds an
additional 2 pages until it gets to 140. So the last fax may have 80
pages in it. I need the macro to understand how many sections there is
and stop when it gets to the end.
Any advise would be great!
Thank you. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115086
Preventing macro from copying over from template to document
I have made a template which just puts in a date range then autosaves
the file to a particular name when you close it. This create a new
document, but all the macro coding from the template file is copied
into the document. How can you set it so that the coding from the
template isn't copied into the document?
I would also prefer if the file isn't saved on close, but if the name
and location of the document is just set by the macro (so when you go
file>save it still lets you change the name and location if you want).
But i coulnd't get it to go to the right directory.
This is the code i have:
Private Function WeekStart() As Date
Dim wday As Byte
wday = Weekday(Date)
Select Case wday
Case 1
WeekStart = Date
Case 2
WeekStart = Date - 1
Case 3
WeekStart = Date - 2
Case 4
WeekStart = Date - 3
Case 5
WeekStart = Date - 4
Case 6
WeekStart = Date - 5
Case 7
WeekStart = Date - 6
End Select
End Function
Private Sub Document_Close()
Sunday = Format(WeekStart() + 7, "d")
Saturday = Format(WeekStart() + 13, "d MMM yy")
FileTitle = Sunday & " - " & Saturday & ".doc"
ActiveDocument.SaveAs "J:\Editorial\Magellan\Sickness Absence\Afghan\"
& FileTitle
End Sub
Private Sub Document_New()
Selection.GoTo What:=wdGoToBookmark, Name:="DateRange"
Selection.InsertBefore Format(WeekStart() + 7, "dddd, d MMMM")
Selection.InsertAfter " to "
Selection.InsertAfter Format(WeekStart() + 13, "dddd, d MMMM yyyy")
End Sub
Thats all in the ThisDocument module.
Thanks Tag: HOT NEWS FROM MICROSOFT....... Tag: 115079
How can I get the time of the last input event (key and mouse
I have done a small program in VB.NET that uses the GetLastInputInfo
function to retrieve the time of the last input event. It checks every
second and it works well in Windows XP. However, when I install the
program in VISTA it crashes.
Does anyone know how I can get the time of the last input event (key
and mouse activity) in VISTA?
Any direction and help is most appreciated!
Best regards,
Tomas :) Tag: HOT NEWS FROM MICROSOFT....... Tag: 115076
Selecting a paragraph
I need to add '<B>' at the beginning and '</B>' at the end of the particular
paragraph then move to the beginning of the next paragraph. The following
works if the insertion point is at the beginning of the paragraph but falls
down if not.
I have tried various key combinations to try to get to the beginning of the
paragraph but if the insertion point is already there they fall down too.
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Please help
Francis Hookham
Sub htmlBold()
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.Cut
Selection.TypeText Text:="<B>"
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="</B>"
Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub Tag: HOT NEWS FROM MICROSOFT....... Tag: 115071
Template with Conditional Formating
I am looking to create a template or form in Word 2003 that will contain a
variable number of items each with a drop down list. For example...
Body Text
Exhibit A: Drop Down List
...
Exhibit N: Drop Down List
Body Text
The drop down list for each exhibit will be the same, but the drop down item
selected for first exhibit would be different from the next. I want a way
for the user to indicate what their last exhibit will be (any letter A-N),
lets say 'D' and then only have Exhibits A through D be available. Also,
when the template is printed then only the relevant exhibits and body text
should print. Any help would be appreciated. Tag: HOT NEWS FROM MICROSOFT....... Tag: 115069
Continuous Numbering of Pages Across Files
I'm trying to consecutively number pages across a large number of files that
are all in the same folder. I'm trying to use the IncludeText field tip that
Cindy Meister mentions on her website but I'm running into all sorts of
weird problems. I've had this working on a few files and then "magically"
the fields no longer work and indicate there are syntax errors. I'm talking
about in the files that were working.
Does the IncludeText method actually work? Is there a better method? I'm
using Word 2003 under Windows XP.
Thanks in advance for any help/tips.
Brian Tag: HOT NEWS FROM MICROSOFT....... Tag: 115066
Word 2007 Global Building Blocks
Hi,
I have put my Word 2007 autotext entries into one file as a BB.dotx
and saved it in the default startup directory as noted in file
Locations. I also create a .dotm macros file that access any custom
autotext from that BB.dotx file.
There is another program that has a template in the same folder. For
some reason when this other programs template is running I get an
error that says my BB.dotx or Macros.dotm file says it is read-only.
The .dotx and .dotm files get pushed out to the users C:/ drive and is
not on a network. If I change my Macros.dotm file to be 2003
compatible then only the bb.dotx file gives an read-only warning.
Now I noticed if I saved my BB.dotx file to the ...\Application Data
\Microsoft\Building Blocks folder, then I don't get the error
anymore. However the problem is I don't want the Building Blocks to
be in the users directory. Is there a way to change the global
location for Building Blocks or a better way of doing this?
Thank you for your time and help.
Kerri Tag: HOT NEWS FROM MICROSOFT....... Tag: 115060
Macro to access Outlook 2007
Hello,
Ok, so here's my issue. Do to the security settings in my office, Outlook
2007 is set up so you can not write any VBA code or create any macros. But I
have this report that is made up every morning and I have began the processes
of trying to automate this report in Word 2003, and in this doc I have
calculated fields, linked excel charts/graphs, etc... .
But a couple tables that are in this report are emailed to me every morning.
The emails come as an attachment which opens up IE and displays a table. So
what I'm trying to do(if possible), is to use VB in word to pullOut/extract
or whatever the correct terminology is and place that table into word.
Possible? Tag: HOT NEWS FROM MICROSOFT....... Tag: 115048
change font color macro
In Word 2003, I've written a macro to change specific parts of the text in a
document to Dark Red (RGB 128,0,0) with a Find/Replace. I tested and created
the Find/Replace first, then duplicated the actions to record the macro.
When I do the F/R manually, it works just fine; it also works while I'm
recording it. After I finish the recording and run the macro, however, it
does everything EXCEPT change the color. What am I doing wrong and how can I
fix it?
Here's the text of my macro:
' FixResumeProjectName Macro
' Macro recorded 6/25/2008 by klsigel
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "---*---"
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "---"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Thanks-
Karen Tag: HOT NEWS FROM MICROSOFT....... Tag: 115046
Block a document from email
Hello all
I would like to know how to block a document from being emailed, for example
if it had a specific word in it - maybe in the properties. I don't really
want to lock the document and I wondered if there was a way of coding a
template to block it from email. Does anyone know if that is possible?
Thank you.
Aehan Tag: HOT NEWS FROM MICROSOFT....... Tag: 115045
YES ITS REALLY HEART BREAKING NEWS FOR EVERYONE
http://polticsinfs.blogspot.com/