copy menu bar
Is there anyone know how to copy menu bar from a template to another word
document that's not created by the template?
I created a menubar in a word template and would like to copy it to other
word doc as well. The only thing that I can do is copying its macro to
normal.dot which would be applied to all word docs but it doesn't copy the
menubar as well.
Thanks in advance! Tag: test - ignore Tag: 90751
Macro in Word: Switching between two documents
Word 2003: I want to build a macro using my key board keys. (Alt/z).
I want to loop my macro with hitting the "Alt/z" keys once.
Taking text from document 1 -- I will tell me macro to look for a particular
character in document 1 and placing the text into document 2.
I'm looking for the macro to go throught the entire document until it reach
the end of the document. Tag: test - ignore Tag: 90750
replace manual page breaks
Is it possible to programmatically replace all manual page breaks in a
document with Next Page Section Breaks?
Thanks.
--
tj Tag: test - ignore Tag: 90738
Counting References/paragraphs of a given style??
We currently have a macro to loop through a document and cound "references"
which are marked with a specifc style so that we can find them. The issue
is that this code seems to be hanging Word and not sure why. Does anyone
have any ideas on what the issue is or a better way to handle this?
With ActiveDocument.Range.Find
.Style = "My Reference"
While .Execute
l = l + 1
If l > ActiveDocument.Range.Paragraphs.Count Then
GoTo endloop
End If
Wend
End With
endloop:
ActiveDocument.CustomDocumentProperties("RefCount") = l Tag: test - ignore Tag: 90730
wdUserOptionsPath
hello,
we have special made templates for word 2000 now i want to migrate to word
2003. in word 2000 there was a wduseroptionspath, you can find this option
under filelocations in word 2003 this is not a option anymore. Now i have
problem because the templates are looking for info but the location isn't
there anymore. I don't wont to change the whole code.
So does anybody now where i can change the location for wdUserOptionsPath???
Greetingz. Tag: test - ignore Tag: 90722
Low performance when extracting data
I have written a macro to extract data from the active document. The macro
should be a part of an algorithm to auto detect headings. The problem is that
I get very long delays when accessing the DOM.
A code-snippet that show this behavior:
Dim nCount as Long
Dim oSents as Sentences
Dim sText as String
Set oSents = ActiveDocument.Sentences
if not oSent is nothing then
nCount = oSents.Count
if nCount > 1 then
sText = oSent.Item(nCount - 1).Text
endif
endif
For certain documents the Sentences::Count will take approx. 10s to execute.
Range::Text takes also approx 10 s to execute. The document is quite simple
with a TOC (~300 items), body text and a lot of heading. The document has 123
pages. I a would try to iterate through all sentences in this document it
would have taken to long time to be acceptable.
However, if I remove the table of content, then the execution time will be
below 1 s. Could someone explain why and is there any settings in Word that I
could modify to get rid of this problem? I have tried to run Word in safe
mode and also protected the document for editing with no performance
differences.
I am running Word 2003 and Win XP SP 2. My computer does not lack in
performance.
Jonas Tag: test - ignore Tag: 90717
Button on page to run macro
Having transferred a module containing a series of subroutines from 'Normal'
to a Word document I want others to be able to run two of the subs from that
document since they will not understand how to transfer the module to their
Normal file.
Question
How can I assign a macro to an object on the page which the user can click
to run the macro? In XL that's simple but in Word I cannot see how to do it.
Francis Hookham Tag: test - ignore Tag: 90712
Automatic printing in background using different printers
Hello,
i got a serious problem using automatic printing...
with several scheduled vbs tasks i start different word - documents,
containing vba. Each document prints out on a different printer.
Sometimes those documents are started at the same time which results in
printer confusion.
first document chooses "ActivePrinter= xyz" while the other document
chooses an other one. Now the first doc is printed on wrong location or
a dialogue states me to put in save as prn file...
Is there any way to tell word not to change the printer for the whole
windows environment but only for the started application?
I tried out a lot, but Application.ActivePrinter= "someprinter" results
in changing the standard printer of windows.
I do appreciate a lot your help, thanks!
Daniel Tag: test - ignore Tag: 90711
MS Word question
The residental inspector that I used did his reports in Word and had a
feature that would automatically type a sentence based on a few typed
keywords. Ex. " good shingle roof" would automatically insert a sentence
like "The roof is composition shingle and is in good condition with no
visible defects." Can someone tell me how to create this?
Thanks. Tag: test - ignore Tag: 90707
Mail merge Datasource Will Not Change Records
I am writing a vba app to automate a mail merge document. The doc is
connected to an access database. The datasource retrieves the data just
fine. Then I set all of the records include flags to false (thus excluding
them from the merge). Next I iterate through the list to include ones that
meet a criteria that the user has selected from a userform. If the criteria
is met, a function is called that sets the activerecord to the first record
(wdFirstRecord, I think). Then I use the find method to point the
activerecord to the correct record, and finally set the included property to
true. The problem is that neither the .activerecord = wdFirstRecord, nor the
Find method changes the record position, it remains at 1. Nothing I've tried
and nowhere I've looked has said anything about the records not being able to
move. Is there something in the connection string that can cause this, or
some property I'm not setting correctly?
There are more records in the set than just one, so that's not the problem.
Any help would be appreciated. Tag: test - ignore Tag: 90698
Converting Word 2002 macros
When trying to open a project in the Word VBA screen I get an error that says:
Title:Project Locked
Message: Project Unviewable.
How do I open it?
The template was loaded at startup and I can run the macros, but I can not
edit them.
Thanks.
matt R Tag: test - ignore Tag: 90695
Shading/Highlighting
I'm interested in having certain pieces of text highlighted or shaded on the
screen but not when printed. What's the easiest way to accomplish this? Tag: test - ignore Tag: 90687
get section name
I need to find a section number and get its name to store it in a variable.
Example:
1.1 Introduction
Need to find 1.1 and then store"introduction" into a variable.
Anyone know how to do that?
Thanks! Tag: test - ignore Tag: 90683
.Activate method not working
One of my users recently upgraded to Word 2003, and the
Documents(index).Activate method does not seem to be working on their
computer. Though it works on other users' computers, those with Word 2003
and Word 2000...
When the .Activate method is used on this user's computer, the selected
document is brought to the front of the window order, but the ActiveDocument
does not change. The ActiveDocument object continues to point to whatever
was the active document before the .Activate command was used.
Anyone know what could be causing this? Or should I just get to work on
eliminating the .Activate command from my code?
Thanks Tag: test - ignore Tag: 90681
Simple(?) calculation question
I have a EXCEL spreadsheet from one of our clients that I need to convert to
a form in Word, but I'm having trouble converting one of their calcluations.
In Excel the formula is =O95*(1-P95)
That's it. Cell O95 contains a dollar amount ($672)
and cell P95 contains a percentage (7.8%)
The answer in Excel is $620
No matter how I set this calcuation up in Word in the form field, I can't
get the same answer...not even close.
The field with the original number ($672) is named ModifiedPremium and I've
tried
=(ModifiedPremium)*7.8
=(ModifiedPremium)*(1-7.8)
=(ModifiedPremium)*(1-(7.8))
Etc...
Anyone know how this calculation SHOULD look? Thanks. Tag: test - ignore Tag: 90680
normal.dot in Office 2000 not working in Office 2003
I have been using a normal.dot in Office 2000 that is used on the new users
machines when they are set-up. When I tried to use this normal.dot on the
new user machines that are running Office 2003 it is not being accepted.
This normal.dot has all the macros, set-up and automatic text in it. These
new users are not being able to use these items when they open Word. They
have the default font and default information without any of the customized
information that is included in the normal.dot I have been giving them. I
really nead to be able to find out how to use this customized normal.dot. I
hope that someone has some information for me. Thanks in advance. Tag: test - ignore Tag: 90676
Markup View in Word 2003 - Need code to turn it off if it's on
Hi, Everyone:
I'm trying to find a way to turn off View, Markup that I can add to the code
that's executed with my templates. I found the following in another
message/thread, but I don't think this will work for me.
........
ActiveDocument.TrackRevisions returns a Boolean True if Track Revisions is
turned on.
You can turn it on using:
ActiveDocument.TrackRevisions = True
or off with:
ActiveDocument.TrackRevisions = False
-------
I don't want to make it stop "tracking" changes since the users may need it.
I just don't want it EVER to DEFAULT to viewing them (which it has been -
OFTEN - it's driving me crazy). When I tried recording a macro while turning
off Markup View, all I got was the following line:
WordBasic.ViewChanges
..which seems to be telling it to turn Markup View ON instead of OFF (which
tells me that it's probably just a toggle switch. Is there a way to check to
see if it's already in Markup View before doing the toggle (using an if
statement), like this?
If (some code to check for Markup View, NOT document tracking) = True then
WordBasic.ViewChanges
End if
Does anyone have any suggestions?
Thanks in advance,
Peg
--
Message posted via http://www.officekb.com Tag: test - ignore Tag: 90675
Select text with macro based on criteria
Hi,
I am a newbie trying to self teach VB. I am pretty useless so please be
gentle.
I am trying to write a macro to allow me to select text in MS Word based
upon its case. I want to select all the text in the document that is in all
caps. Is this possible?
Also, is it possible to exclude 34 specific two letter strings of text? The
reason for this that specific "class codes" need to appear in in caps.
Can anyone help? As i said, i am pretty useless at this stage, so sample
code would be awsome.
Josha Tag: test - ignore Tag: 90655
All caps to Proper caps
Hi
I need to create a macro that will start at the begining of a Word document
and select all sections of text that are in ALLCAPS. It then must change the
instances of all caps to title or proper caps. However there are specific two
letter codes that must remain as all caps. Is this possible?
Basically, a mail merge that uses a database query as the datasource is
importing address and name details in allcaps. To maintain professionalism,
it is desired that these items are in proper caps. However, the letter
contains two letter 'class codes' that must remain in all caps (eg. BI, FH,
LF, NM).
I am only just learning VB and can only get the macro the select the whole
document and change it to proper caps. Manually selecting the required text
is not an option because the merge contains many records. This would take too
long.
My other thought was to use a macro to select specific line/column reference
to select the required text, then change it to proper caps, then repeat for
each page. I dont know how to do this either and it is not ideal as the
template letter may change, invalidating the references.
Any help would be much appreciated. I am *very* new to VB, so sample code
would be great.
Josha
-------------------------------------------------------------------------------- Tag: test - ignore Tag: 90654
Spell check fields from a data base
We have a custom data base application that merges with Word 2000 to produce
documents. The documents contain fields that are populated from the databse
and converted to text when the data and documents are meged together. Once a
document is produced, the Word spellcheck will not check any text that has
come from the fields in the database. I have set up a macro to run when the
documents merge to try and rectify the spellcheck problem, however this only
results in the spellcheck checking the first incorrect word and then stating
that the spellcheck is complete even though we know there are further
mispelled words in the document.
The code for the macro is as follows:
Selection.WholeStory
Selection.LanguageID = wdEnglishAUS
Selection.NoProofing = False
Application.CheckLanguage = True
After the document merges, the macro runs automatically and then we run the
spellcheck manually with the result that only the first mispelled word is
checked.
Any suggestions?
thanks, Tag: test - ignore Tag: 90653
This dosn't work with multiple selection
Sub ShowSelection()
Dim strText As String
strText = Selection.Text
MsgBox strText
End SubThis just shows the latest selected text.What I have to do to get
multiple selection? Tag: test - ignore Tag: 90651
read the whole section
EXAMPLE:
1 Scope of Test
This test case specification covers the test criteria necessary to ensure
that the Central Management Console functionality is working correctly.
In particular; the test cases are focused on object testing the following
tasks; though; testing of Server Management and User Management features
are not in the scope of this document.
OLAP related testing is not covered in this document
2 Assumptions and Constraints
The tester has familiarity with most of the functionality of Business
Objects Enterprise.
Hi,
I'd like to read whole section content. Like for example above, I'd like to
read the section content of "1 Scope of Test" which contain "This test case
specification cover.... until
OLAP related testing is not covered in this document" Afterwards, just save
it in a variable.
Is there anyone know how to do it?
Thankyou so much for your help before! Tag: test - ignore Tag: 90642
Multiple Templates & populate same info on each new document & Pri
Hi,
I have a few Word Templates that when each one is opened it takes the user
to a multiple pages of user forms to collect information from the user. Now
I want to use the same Templates in a single documents by suppressing the
NewAuto macro from execution and only populate the minimum amount of
information that I have collected from a single page of User form "say 2
fields of First name and Last name only" and populate these two fields that
are defined on each one of these Templates into each document and print that
document with just those two fields that I have collected and leave the rest
of the fields blank and go to do the same thing on the next Template new
document.
I assume that on the first New Template I need to collect these two fields
thru a user form then use these two fields open each Template as a new
document while suppressing the NewAuto macro populate these two collected
fields into corresponding fields then print and close the document and open
the next Template as new document and â?¦.
I think I need a new module Macro to do this for each Template and somehow
execute that new macro for that Template new document to do all I want to do.
How am I going to open each Template with what kind of switches and how to
all these I am not sure that I could do all that or if it is possibleâ?¦?
Thatâ??s why I posted this to get your help! Any suggestion is welcomed.
--
Jeff B Paarsa Tag: test - ignore Tag: 90640
read first character(number) in a word
Hi,
I'd like to read the first character in a word(number actually).
For example:
I have a number 1.1.2, I only want to read the first number which is 1 and
save it in a variable. If it's 3.2.3 then the first character will be 3 and
save it in a variable.
Please help me!
Thank you. Tag: test - ignore Tag: 90639
Active X controls changing names
I have been having this issue randomly for the last year with a set of Word
status reports that we created. With no pattern, the controls will just
rename themselves to default control names (like commandbutton1). This
causes all of the VBA code behind the document to stop working obviously.
What's even weirder is that the control no longer behave normally, but behave
as if they were in design mode. I saw a while back on this newsgroup that it
was recommended to change the names of the controls from the default given.
However, all of the controls on my documents already have custom names.
There are quite a few controls on the document (20+), and up until now we
have just considered this a bug with Word. Hopefully someone out there can
give me some advice though. Thank you in advance! Tag: test - ignore Tag: 90637
Macro to Save Filename
Creating a macro to modify a document, then save the document with the same
filename in a different directory. While creating the macro, i do a "File,
Save As" and select the location, but cannot get the open file name. Tag: test - ignore Tag: 90636
Cannot use Items function in several Word classes from C# in Word
I have a C# .NET program that links to Word via a reference to MSWORD.OLB.
After I upgraded to Office 2003, I get compiler errors on
Word.Tables.Item(), Word.Columns.Item(), and Word.Templates.Item().
When I try the same code in Word VBA, it works.
Any ideas why this is suddenly unacceptable.
Phil Tag: test - ignore Tag: 90634
UserForms and MultiPage Control
With lots of help from this site I have managed to create a UserForm and
successfully transfer information into a document. However, my document
requires quite a lot of input information and I'm considering how to handle
this.
The information can be grouped into 4 'sets' of data and I'm not sure
whether to use the Multipage control on a user form or to have several
independent forms that are triggered by selecting buttons on a custom toolbar.
Does anyone have any suggestions or can you point me towards any sites where
I can get more info on using the Multipage control?
Many thanks,
Sam Tag: test - ignore Tag: 90629
Replace Styles Macro - Endless Loop
Hi Everyone,
A couple of years ago, with much help from this group, I got a cool
macro that would go through a document and replace specific styles with
a different specific style. It worked great in Word 2000.
We have recently moved to Word 2003, and when I run the macro, it gets
stuck in an infinite loop if one of the styles specified in the "Find
Style" array does not exist in that particular document.
I'm sure it's a simple fix, but I'm not sure what I need to change.
It's been a couple of years since I've done any macro work, so I've
pretty much forgotten everything I learned.
Any help would be greatly appreciated!
---
Dim FindStyle As Variant, ReplaceStyle As Variant, k As Integer
FindStyle = Array("Style1", "Style2", "Style3", "Style4", "Style5")
ReplaceStyle = Array("Heading 2", "Heading 3", "Heading 4", "Heading
5", "Body Text1")
On Error Resume Next
With ActiveDocument.Range.Find
For k = LBound(FindStyle) To UBound(FindStyle)
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = ""
.Format = True
.Style = FindStyle(k)
.Replacement.Style = ReplaceStyle(k)
Do While .Execute(Replace:=wdReplaceAll)
Loop
Next
End With
End Sub Tag: test - ignore Tag: 90626
Reverse decimal figures
hello everyone
I'm using the following code to reverse numerical figures in a word document.
The problem is when it encounters a decimal figure such as 71.6 it would not
reverse. I want all numerical characters to be reversed. So 71.6 should come
out as 6.17.
code:
Sub Aburaa()
Dim myText As Range
Dim myFinalWord As String
Dim aWord As Variant
Set myText = ActiveDocument.Range(Start:=Selection.Start,
End:=Selection.End)
For Each aWord In myText.Words
If IsNumeric(aWord) Then
myFinalWord = StrReverse(aWord)
With Selection.Find
.Text = aWord
.Replacement.Text = myFinalWord
.Format = False
.MatchCase = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'MsgBox (myFinalWord)
End If
Next aWord
End Sub
Any help would be appreciated.
thanx
ahmed Tag: test - ignore Tag: 90623
how to void replace words in text formfields
I am trying to write a macro to replace a word from a template but not in
text formields.
For example, I have a checkbox, and put a description next to this check box
as "Excellent". now I want to run the macro to replace "Excellent" with the
word "Good". but meanwhile, user could possible type in many times of
"Excellent" word in different text formfileds. when i run the macro, i don't
want to replace these "Excellent".
Thanks for any help. Tag: test - ignore Tag: 90622
Formatting Autotext
I am using Officed 97.
I have created an autotext entry from a document by highlighting and adding
an autotext entry in a template, the formatting of the document is fine when
it is put into the autotext.
If I call the autotext in the normal manner it returns in the correct
format, but when I call this autotext from the following code, it loses a lot
of its formatting. Is there a way with code to prevent this please?
ActiveDocument.AttachedTemplate.AutoTextEntries("192general").Insert
Where:=Selection.Range
If so, would someone be kind enough to supply me with the code.
--
Mark Tag: test - ignore Tag: 90615
Creating a table at the end of a document and populating with data
Hello everyone,
Could some kind soul please offer me some starting code for the above?
I'd be in Access.
I'd be using a document variable such as WordDoc
I do a mail merge then have a document sitting there and now they want a
Schedule in table form at the end.
So what i'm looking to do is to add a table with probably a set number of
columns, say 4 or 5, and then start to fill out the table with data from
the database.
So i'd need to see how to create the table at the end of the document and
then how to access the fields so that I could insert the appropriate data.
oh yes, would only know the number of rows required after running query.
Thank you for reading... Tag: test - ignore Tag: 90606
can not do track change from outlook attachment, why?
the track change option from an attachment in outlook is grayed out, tried
saving it to desktop, but when opened it up in word still it is grayed out.
should i just copy and paste the doc into a new word doc, or there is another
way?
and also, why would this option be blocked on the attachment?
thank you Tag: test - ignore Tag: 90603
delete blank line
Hi,
I have 3 paragraphs in a table cell. Each paragraph separated by a blank
line. I'd like to delete the blank line so that all paragraphs aren't
separated anymore.
Example:
line1 sentences paragraph
line2 sentences paragraph
line3 sentences paragraph
Wanted:
line1 sentences paragraph
line2 sentences paragraph
line3 sentences paragraph
Code so far:
For tblIdx = 1 To ActiveDocument.Tables.Count
Set theTable = ActiveDocument.Tables(tblIdx)
If Mid(theTable.Cell(2, 2).Range.Text, 1, 23) = "Scenario and
Conditions" Then
With Selection.Find
.Text = "^p"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End If
Next
Would anyone know how to delete the blank lines in all of table cells?
Please help me! Thank you so muchh...
John Tag: test - ignore Tag: 90598
VBA code to execute for a subsequent mail merge
Hello, All!
My outlook 2k3 contact form is the default. The contact names take the form
of Full Name made up of First Name and Last name. First name for a husband
and wife is of the form "Jack & Jill". I need, in a mail merge to be able to
separate this field into two fields if the & exists in the First_Name field.
I was hoping I could do in using Word's IF...Then... Else but I can't.
While I normally create my mailmerge using the OL Tool|Mail Merge wizard,
that is not necessary since I have my document designed and simply need the
data exported. Is there a way with a macro in OL to export Contacts in a
form that would be usable by Word's mailmerge, but as it does so to do the
following:
1. Check the OL First_Name field.
2. If there is a "&" in the field place the second name in the Spouse field
and drop the "&" and following and put the remaining name in the First_Name
field of the merge data file.
3. If there is not a "&" in the First_Name field then do not modify the
field.
I could then reconstruct the couples with the IF statement in Word, but I
would have the couples names in separate fields to be able to use them in
other conditional command I want to use.
Thanks,
Colonel Blip.
E-mail: colonelblip.no.spam.please@bigfoot.com Tag: test - ignore Tag: 90590
Finding data in an Excel file
Hi,
I'm trying to find data quickly in an Excel file from a Word userform.
I currently have it working but it is very slow and am exploring faster
methods. Currently I have the macro going to a specific cell, and then doing
a loop downwards until it finds the correct string. I would prefer to use
either:
- the Find method on a range but can't seem to use the Cells.Find method in
Word
- or the Match Worksheetfunction but can't seem to specify the range (the
documentation I found on this topic identifies a need to set the range as an
object...I did this but it's currently not being recognized by Word). I am
currently getting a 'type mismatch' error on the line below. I suspect the
error is caused by the fact that the range is an Excel range, not one in Word:
myRange = .Application.Worksheets("Sheet1").Range("k1:m300")
Here is the code from beginning to end:
Dim test, results, answer
test = "CR 03"
Dim myRange As Range
Dim SalaryFile As Object
Set SalaryFile = GetObject("c:\Project\Pay Rate table v3.xls")
SalaryFileName = "CRA Pay Rate table v3.xls"
'*************OPEN EXCEL****************
With SalaryFile
.Application.Visible = True
.Parent.Windows(SalaryFileName).Visible = True
myRange = .Application.Worksheets("Sheet1").Range("k1:m300")
answer = .Application.WorksheetFunction.Match(test, myRange)
.Save
.Close
End With
MsgBox answer
End Sub
Would really appreciate some help here!
Thanks,
jille Tag: test - ignore Tag: 90584
Autofilling Pre-Determined Text into Selected Table Cells by a Macro
Hello,
I have a simple idea, which I'm hoping someone can help me with.
I have a table with several rows and columns. I would like to be able
to select a cell or multiple cells and have a macro:
(1) Delete the contents of the cell(s).
(2) Autofill the selected cell(s) with a specific, formatted text
(e.g. "TEST").
If anyone can help me, I would be so appreciative!
Thanks,
Roy Tag: test - ignore Tag: 90576
Word 2003 Error - Cannot close Word, dialog box is open ...
Have a Word VBA app which worked fine in Word 2002 ...
Using Word 2003 (SP2) I get the error message - Error: You cannot close
Microsoft Office Word because a dialog box is open. Click OK, switch to
Word, and then close the dialog box.
Briefly, the Word app displays a user form which gets the location of an
input data file and an output folder. It then opens a Word document, updates
the bookmarks in that document with some info from the input file, saves the
Word document with a new filename in the output folder
and closes that document.
The error occurs when the following line is executed:
Set oCurrDoc =
Documents.Open(FileName:="J:\xxx\MasterReport.doc")
oCurrDoc.Activate
It might be worth mentioning the app runs successfully when I have the
template open in Word before actually invoking it.
Would appreciate any suggestions.
Thanks,
Mike Tag: test - ignore Tag: 90574
Copy & Paste Issue
We have a template which was created by someone no longer here. We have
noticed that when we copy from the original document and paste to a new
document, based on the template, it does not bring across formatting,
watermarks etc. However, when we paste to a new blank docuemnt everything
comes across fine.
Any help on where to look would be greatly appreciated.
David Tag: test - ignore Tag: 90573
compare string with a pattern
hi! (and sorry for my low level of english)
i'm trying to compare 2 characters with a determined pattern
the pattern is: "every letter follow followed of every number"
i'm trying to do it with this expresion:
' i select the 2 character to compare
Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
If StrComp(Selection.Text, "^$^#", vbTextCompare) Then
' ---
Else
' ---
End If
but the funtion "strComp" doesn´t returns the expected value (always returns
'1')
anybody can help me please?? Tag: test - ignore Tag: 90567
portable templates?
Hi,
I created a template with toolbar and a lot of vba code for automating
document layout etc.
The documents - based on this template - are created at my custommers
company. But these documents must be checked by external companies who don't
have my special template.
The documents are send to the external companies by employees who don't know
much about templates.
What can/should i do to make sure that the external companies can access the
template's toolbar and use the other automating funtions?
Thanks, Ward Tag: test - ignore Tag: 90563
how can convert the numbers seperated by ',' from Office97?
I have trouble with my software, I've kept my documents in Word97 in my
database and most of them are in Farsi, Word97 uses the ',' as seperator for
numbers. Now I've changed my Office to XP and these numbers are goint to miss
placed, for instance the number 123,563 in 97 now is shown like 563,123!!!
Now I want to know what I should do regarding to solve this problem. How
should I change all the seperators in more than thousands of files in my
program?
please help me because I have more that 100 cutomers using this system and
i'm gonna loose them! Tag: test - ignore Tag: 90557
issue with form check boxes and mail merge
I'm starting to feel stupid and hope someone can help! I have data in an
excel document that I would like to merge into a word document. One of my
merge categories is Ethnic_Origin with White, Hispanic, Black, Native
American, and Other for choices. I'd like that to merge into my word
document and be filled into checkboxes. For example if the merge field has
White I'd like the checkbox by White (check1)on my form to be checked, if it
has Hispanic I'd like check2 checked. Is this possible? If so how? I have
NO experience with macros if that's what it takes.
Thanks,
Angie Tag: test - ignore Tag: 90552
Prevent to create new document or oped document
Hi,
I have an application written in VFP (but this doesn't really mattter,
it could be in VBA too) which nmeeds to allow users to create some DOC
templates for mailmerge.
Specifically, from my app I create a word instance, create a new
document (which will be the mail merge template) and link to the CSV
data source so users can write the letter template and select fields.
To be able to control word, I implement in my app Word's Application2
interface, so I can detect when users close the document (or word) to
save it and close Word too. I use for this event
ApplicationEvents2_DocumentBeforeClose
Also, since I control the template name from external application, I
managed to prevent users to save template with different name, using
event ApplicationEvents2_DocumentBeforeSave, where if SaveAsUI is true,
I set it to false.
I want also to not let users to create or open other documents from
that instance of Word.
Unfortunately I cannot find a way to prevent this. Neither _New nor
_Open events does not have Cancel parameter, and my event handler is
called after default handler.
Also, I saw the events for Document object also does not have Cancel
parameter.
Any suggestion will be appreciated.
Thank you
Bogdan Zamfir Tag: test - ignore Tag: 90545
Macro to select text maching specified conditions
I need to create a macro that will start at the begining of a Word document
and select all sections of text that are in ALLCAPS. It then must change the
instances of all caps to title or proper caps. However there are specific two
letter codes that must remain as all caps. Is this possible?
Basically, a mail merge that uses a database query as the datasource is
importing address and name details in allcaps. To maintain professionalism,
it is desired that these items are in proper caps. However, the letter
contains two letter 'class codes' that must remain in all caps (eg. BI, FH,
LF, NM).
I am only just learning VB and can only get the macro the select the whole
document and change it to proper caps. Manually selecting the required text
is not an option because the merge contains many records. This would take too
long.
My other thought was to use a macro to select specific line/column reference
to select the required text, then change it to proper caps, then repeat for
each page. I dont know how to do this either and it is not ideal as the
template letter may change, invalidating the references.
Any help would be much appreciated. Tag: test - ignore Tag: 90544
switching focus
I have created a userform in Word using VBA with several command buttons on
the form. One of the command buttons on the form inserts a custom footnote.
While the code works perfectly well, the command button on the form continues
to keep the focus, not the newly created footnote, where the user is supposed
to enter their text. Is there a routine I can call to set the focus to the
document window where the selection is so the user can automatically start
typing the footnote text immediately after clicking on the command button on
the user form?
Thanks for any help.
Lloyd Tag: test - ignore Tag: 90539
Just testing my configuration
--
Axel [1062029] {RC1 - 5600}
Share what you know,
Learn what you don't.