Offer Word with "manual" type mode option without auto format
The auto format is very aggravating to me an many people I talk to. We used
to use
word perfect which was much easier to use , at least in its earlier
versions. Most of us (older users) do not have time to spend learning a lot
of how to use what should be a simple program that we can just use instead
of spending a lot of time learning
how to program a typed in document. A full "manua" option should be
offered so that we can type in what we want without the program changing or
"correting it for me ." Because of limited funds, I often do not have access
to a secretary that might know how to format a Word document. I often have to
do my own typing of documents and I am ( along with others) extremely
frustrated with the Word auto formating and how it changes something back
after I try to change it or it won't let me change something on the document.
I learned to type in the 1960's and I would like to be able to just type.
The program should have a very simple method of programing features such as
"auto return" etc. I would be more than happy to
discuss this in greater detail. I believe you would have a lot more happy
users if
this would be offered. As I said, many people I talk to are frustrated with
Word.
We use it because it seems to have become the standard format for most users.
When I have to stop and try to go into help to try to figure out what to do,
I waste time that I don't have and often can't easily find what I need. Again
I mention the
high levels of frustration me and many of my coworders have with Word. We
had a
hard time getting several staff members in my office to switch from word
perfect to word. Anything you can do soon to make this an option would be
greatly appreciated.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/community/en-us/default.mspx?mid=34ea0d5b-9ccd-4825-a5b7-487eea09c806&dg=microsoft.public.word.vba.general Tag: Identify the page you are on Tag: 80936
starting VBA fron any of the MS office app cause this app to end
Hi,
I have beed suggested to post my problem here.
I have recently done a fresh install of MS Windows XP SP2 with all the
last windows update
I have installed .Net Entreprise 2003 and MS Office 2003 Pro
Every time i am trying to launch the VBEditor for any of th office app,
i return on my desktop without any warning :(
Any idea about this problem ?
Any help will be greatly appreciated.
Thanks for your help Tag: Identify the page you are on Tag: 80931
Need to refine simple code ending in Wend
Hello
Helmet gave me some code as usual and I have managed to create a second
macro from the original to handle characters instead of words (one small
step for man, one gaint leap for nevekind)
The macro is a follows
_____________________________________________
Sub GOL()
' GOL Macro (Go one letter)
' Macro créée le 11/02/2006 par Dave Neve
'
Dim l As Long
Application.ScreenUpdating = False
ActiveWindow.View.ShowHiddenText = True
l = 1
With Selection.Cells(1).Range
While .Characters(l).Font.Hidden = False
l = l + 1
Wend
.Characters(l).Font.Hidden = False
End With
ActiveWindow.View.ShowHiddenText = False
Application.ScreenUpdating = True
End Sub
_____________________________________________________________________________________________
The problems comes when I reach the end of the last word but don't
necessarily know as I can't remember how many words are in the cell.
I click on the macro again and nothing happens, probably cos there is a
space character.
But the next click is 'fatal'.
There is an error that the 'collection object'(not sure of exact term in
English) can't be found and worse still, this seems to trigger Word to
activate 'show masked text' in the whole table which I then have to untick
manually.
Can anyone help please?
Thanks Tag: Identify the page you are on Tag: 80928
macro effect on browse control button
I have created a macro that runs through the sections of a document and adds
a footer to each page. A side effect has been that the "browse" control that
is located just below the vertical scroll bar changes from "previous page /
next page" to "previous section / next section". This is a minor annoyance
for users since they can change it back again, but I am wondering if there is
any way to reset this programmatically to its default, since it does not
appear to be a customizable option that can be set anywhere in Word - tools -
options
thanks,
--
Steve Paul Tag: Identify the page you are on Tag: 80921
Copy all styles starting with certain characters? Generic user na
I can record macros, but know zero VBA. Instead of a macro that copies
certain styles from a template into a document, how can I indicate copy all
styles that start with certain letters - in this case BP?
Also, since the template will be stored in the user's emplate path, how can
I indicate some sort of generic user name? I don't want to have to edit the
macro for every user .
Thank you in advance, I know these are basic questions. Boy, do I feel dumb!! Tag: Identify the page you are on Tag: 80915
All search & replace lines needed?
I am doing a long Word search-and-replace macro in 14-line chunks exemplified
as follows:
With Selection.Find
.Text = "del^13"
.Replacement.Text = "delivery^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Of those lines above, these never change:
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Am I allowed to expunge those lines from each of the 14-line blocks since
they are always the same and, presumably, are at default values? Or do I at
most just have to keep the .Wrap statement? Tag: Identify the page you are on Tag: 80908
Using Nested If expressions in field codes
I am trying to find a way to use Nested If expressions within a field code to
limit a document property that displays the document name from appearing only
on the last page of the last section of a document. The first If expression
cehcks the current page number against the n umber of pages within the
current section of the document. The second If expression checks the current
section number against the number of sections in the document. If both If
expressions are true, then the fild is supposed to display the document name,
otherwise it should display nothing.
I am able to get the result to come out correctly using the code shown below
to generate the field code. I had to create a custom document property named
SectionsCount in order to get the number of sections in the docuemnt to
display within the field:
Private Sub BuildIndentifierField()
On Error GoTo Err_Handler
With Selection
' Begin the First IF expression:
.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="IF ",
PreserveFormatting:=False
.MoveRight Unit:=wdCharacter, Count:=5
.Fields.Add Range:=Selection.Range, Type:=wdFieldPage
.TypeText Text:=" = "
.Fields.Add Range:=Selection.Range, Type:=wdFieldSectionPages
.TypeText Text:=" "
' If the First IF expression is TRUE then use the Second (NESTED) IF
expression:
.TypeText Text:=Chr(34)
.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="IF ",
PreserveFormatting:=False
.MoveRight Unit:=wdCharacter, Count:=5
.Fields.Add Range:=Selection.Range, Type:=wdFieldSection
.TypeText Text:=" = "
.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:="DOCPROPERTY ""SectionsCount"" "
.TypeText Text:=" "
' Add the result to display if the Second IF expression is TRUE:
.TypeText Text:=Chr(34)
.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:="DOCPROPERTY ""Identifier1"" "
.TypeText Text:=Chr(34)
' Add the result to display if the Second IF expression is FALSE:
.TypeText Text:=" " & Chr(34) & Chr(34)
.MoveRight Unit:=wdCharacter, Count:=2
.TypeText Text:=Chr(34)
' Add the result to display if the First IF expression is FALSE:
.TypeText Text:=" " & Chr(34) & Chr(34)
End With
Exit Sub
Err_Handler:
MsgBox Err.Number & ": " & Err.Description, vbOKOnly + vbCritical, "Error"
ActiveWindow.View.ShowFieldCodes = False
application.ScreenUpdating = True
I always get a message saying "Error! Missing test condition." within the
nested If expression of the field. For example, I get this to display
whenever the document is saved: { IF 1 = 6 "Error! Missing test condition."
"" }
If were to toggle the field code over the error message, I can see that my
second If expression is being read correctly by the code, as shown here: { IF
1 = 6 " { IF 1=2 "{ DOCPROPERTY "Identifier1" \* MERGEFORMAT }" "" }" "" }.
Thanks. Tag: Identify the page you are on Tag: 80907
Revealing hidden words
Hi
I've written the following simple bit of code (to reveal the first hidden
word in a cell) but as usual, it doesn't work as expected
______________________________________________________
GetOneWord()
'
' Macro enregistrée le 10/02/2006 par Dave Neve
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
With Selection.Font
.Hidden = False
End With
End Sub
_______________________________________________________
It reveals all the hidden words in the cell and not just the first one.
Why is this please?
Thanks
Dave Neve Tag: Identify the page you are on Tag: 80904
Macro to diplay printer list
Hello,
We have Word 2003. I'd like to create a macro that would pull up a userform
and allow my users to choose which printer they want. I know some visual
basic and I know how to create the userform.
What I need is the code to be able to select the printer.
We have HP Laserject printers.
Thanks! Tag: Identify the page you are on Tag: 80900
Transferring macros and toolbars
Hello
A little question about copying macros and toolbar from one .dot to another
.dot
I have a "normal.dot" and a "special.dot" with my macros.
I needed to create a new .dot which I will call "test.dot".
Firstly, when I tried opening "special.dot" and "test.dot" and using the
tools>macro>organise option, I could not manage to transfer the macros from
"special.dot" to "test.dot" directly.
I had to send the macros to "normal .dot" and then to "test.dot"
Is this a limitation of Word?
Secondly, I finally managed to copy my special toolbar from "special.dot" to
"test.dot" also.
But the link between the macros and the toolbar seems to have been
broken.(the macros can not be found)
How can I relink the macros with the toolbar?
Both are certainly present in special.dot.
Thanks in advance
Dave Neve Tag: Identify the page you are on Tag: 80897
Macro to change style based on style of current paragraph
Hi!
Though I've made a couple of attempts at this, I have yet to figure out how
to create a macro that does the following.
1. Determine the style of the paragraph in which the cursor is sitting.
2. Compare the style determined in step 1 to a short list of style names. If
the style = A, change the style of the paragraph in which the cursor is
sitting to A1;if the style = B, change to B1, and so on.
3. If the style is not equal to one that is on the list, return an error
message.
ANybody have something liek this I can look at or some suggestions about how
to create this macro?
Thanks!
Beth Tag: Identify the page you are on Tag: 80892
Userforms and bookmarks
Hi!
For my template, I've created an autonew macro that displays a userform
prompting the user for a title, code, and date. The responses are displayed
in the file via bookmarks.
I've also created an autoopen macro that prompts the user for a new date.
The problem is that the new date gets added to the bookmark in front of the
existing date (entered when the file was created. I end up with this:
10 Feb 200609 Feb 2006
Any suggestions on how to fix this would be welcome!
Thanks!
Beth Tag: Identify the page you are on Tag: 80891
Hide X button on VBA forms
Hello All,
I am just wondering if it's possible at all to disable or hide the X
button on the top right hand corner of a word VBA windows form? The
form in question is a sub form of the main form in my application, I
want the user to be able to open the form, click off some options and
then close the form, when the form closes however (via the cmdbutton
close) it hides the form so that if they go back into it the options
they chose are still clicked off, if the user however clicks on the X
it disposes of the form and the options are gone.. so i don't want them
to be able to click the X at all...
Thanks in advance for your time!!
Erin Tag: Identify the page you are on Tag: 80882
find current page number
I'm sure this is fairly simple, but for some reason I can't seem to find it.
Does anyone know the code to find the current page number?
This is what I am using it for: I have code that will run on exit of all
the fields on my word form. However, I need the code to vary slightly
depending on the page the field is on. If I can find the page number, I can
have the code run the necessary changes.
Thanks in advance! Tag: Identify the page you are on Tag: 80881
Tick instead of cross
I am using Word in Office XP.
Can anyone assist me, please? I am wanting to create a form which has 'tick
boxes instead of 'cross' boxes.
Thanks in anticpation.
--
Mark Tag: Identify the page you are on Tag: 80878
Identifying the button that activated the macro
Is there a way tell tell what the .ID of the button was that started a macro?
I have several toolbar buttons running the same code, doing slightly
different things determined by their .ID Tag: Identify the page you are on Tag: 80873
Get numbering text when several ListNum on same line
Hi,
I'm having trouble getting the numbering text of a ListNum field when
it is not the first numbering field in a paragraph.
I usually use the ListFormat.ListString property, but it doesn't work
in this case, as this property (and ListFormat in general) always gets
the first list entity in a paragraph.
So if I had this in the document:
"It happens fbecause: a) reason1, b) reason 2, c) reason 3"
the ListFormat.ListString for any range in this line (including the
listnum "Result" and "Code" ranges for any listnum field) would be
"a)".
The same happens if I have a listnum field after a bullet (don't ask me
why anyone would this, it's not my document :)), the code character for
the bullet is returned (whatever it is).
So, how can I get the resulting text of a listnum field, or the listnum
field immediately before the current selection (I have no trouble
finding the field, just getting the text)?
Hope you can help
Thanks Tag: Identify the page you are on Tag: 80867
VB cant find bookmark in Header
Hello again
I have bookmark in Header, When I try to get to it in VB with the code --
objWord.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.GoTo What:=wdGoToBookmark, Name:="HeaderPlanName"
I get the error 5678
"Word cannot find the reuested bookmark."
even though the above is generated by word it self (by recording macro).
Help please!!!
You guys have been great so far Tag: Identify the page you are on Tag: 80866
How can I make all text between '/' and '/' bold?
I'm writing something about phonetics and pronunciation. I've been cutting
and pasting all the symbols. It's too much trouble to make them bold as I go
through. I'd like to find all the things like this '/s/' in a document and
make them bold.
I think this must be possible, but I have no idea how to do it.
I'm using MS Word 2002.
Thanks for any help. Tag: Identify the page you are on Tag: 80864
Pure Virtual Function Call R6025
Can any one help please. I keep getting this error
Program: C:\Program Files\microsoft Office\Office 11\Winword.exe
R6025
-Pure Virtual Fuction Call
On a XP machine SP2 Office 2003 SP2. No other programs.
Have tried reinstalling the service packs and making sure printer drivers
are XP. Have aslo tried installing office 2002 but still get error. Happens
on different word documents.Many thanks
--
Ades Tag: Identify the page you are on Tag: 80863
Pure Virtual Function Call R6025
Can any one help please. I keep getting this error
Program: C:\Program Files\microsoft Office\Office 11\Winword.exe
R6025
-Pure Virtual Fuction Call
On a XP machine SP2 Office 2003 SP2. No other programs.
Have tried reinstalling the service packs and making sure printer drivers
are XP. Have aslo tried installing office 2002 but still get error. Happens
on different word documents.Many thanks
--
Ades Tag: Identify the page you are on Tag: 80862
Bridge documents....Red Hearts and Diamonds, Balck Clubs and Spade
How do I write tutorials for Bridge so word can type, autocorrect or insert
the proper character with its proper color? Red Hearts and Diamonds, Balck
Clubs and Spades are typed many many types, how can this be automated? Tag: Identify the page you are on Tag: 80858
BuiltInDocumentProperties
Hello
I created a Word document template from a document created at another
institution, and stupidly didn't notice that before there were hundreds of
documents in my organization's file system with the other company's name in
the "Company" BuiltInDocumentProperties.
I wrote the routine below to traverse the file tree and update each file. I
change the system time to the original modified time for each file so I don't
end up setting every file to be modified now.
HOWEVER, (A) this is insanely slow (even if I turn off
Application.ScreenUpdating; and (B) I noticed that from Windows Explorer, you
can modify these properties without opening the file.
Does anyone know either:
1) How I could improve the performance in general; or
2) Achieve the same result without having Word open each document?
Tx & rgds
Bongo
Sub Traverse(folderspec)
Dim fs, f, fl, fc, s, company
Dim realdate, realtime, filetime
realdate = Date
realtime = Time()
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set fc = f.Files
For Each fl In fc
If fl.Type = "Microsoft Word Document" Then
filetime = fl.DateLastModified
Documents.Open FileName:=fl.Path
company = Documents(fl.Name).BuiltInDocumentProperties("Company")
If company = "OTHER COMPANY" Then
Time = filetime
Date = filetime
Documents(fl.Name).BuiltInDocumentProperties("Company") =
"MY COMPANY"
Documents(fl.Name).BuiltInDocumentProperties("Keywords") = ""
Documents(fl.Name).Save
End If
Documents(fl.Name).Close
End If
Next
' RECURSIVE PART, DISABLED FOR TESTING
' Set fc = f.subfolders
' For Each fl In fc
' Traverse (fl.Path)
' Next
Time = realtime
End Sub Tag: Identify the page you are on Tag: 80856
Removing blank lines in report
Hi,
I have a report that produces a text file. When I open it in Word its
about 3,000 pages long. This is because 60% of the report is blank
lines.
Is there a way to take out the blank lines using VBA? Once the file is
reduced I hope to import it into Excel.
Regards
Garry Tag: Identify the page you are on Tag: 80852
Using forms to collect information
Hi,
Thanks for your time. I'm using Word 2003. Wondering if there is a way to
have users fill out a form in Word and then be able to collect the data
somehow. I know conceptually there is, I've heard of it being done but I was
wondering if anyone could point me in the right direction.
For example if I wanted to create a survey for my users, create a form using
the form toolbar in Word and then collect and analyze the data in a table or
something like that.
I believe you can do this in Adobe also, but I'd rather use Word if I can.
Thanks! Tag: Identify the page you are on Tag: 80842
example code for
Would someone have some example code for renaming a button on a custom
toolbar called "schedule"? Tag: Identify the page you are on Tag: 80829
Linking word Userform to excel using word vba
I am trying to populate an excel workseet using a word Userform that I have
developed. Everthing that is entered into the userform needs to be exported
to excel. The problem that I ma having is trying to figure out to get the
two programs to talk. I imagine that this is a basic thing to do if you know
what your are doing, I do not. Please help Tag: Identify the page you are on Tag: 80828
Normal.dot
I'm just coming over from Office 97 to XP with Word 2003. Word's VBA macros
used to be stored in Normal.dot. What's the deal with "Normal" now? And,
why doesn't it prompt for module save confirmation when closing after a
modification?
Thanks,
--
Trent Argante
[DC.J(125)] Tag: Identify the page you are on Tag: 80823
Delete a line which has a unique Style with a macro
Hello,
I am trying to find a way to delete many lines in a document, which all have
a unique paragraph style. How can I do that?
Thanks
Octavee Tag: Identify the page you are on Tag: 80822
Paper Tray Bin Selection macro
I need to get the number assigned to paper trays on laser printers and
copiers to add this to a macro for bin selection. I believe there may be a
macro to find this out but not sure what this is.
Have tried choosing File, Page Setup whilst running a macro and whilst this
gives me the bin number on the copiers we use, when I put this code in my
current macro, it doesn't select correct bin - just picks from the default
tray.
On our HP laser printers, when I select File, Page Setup, I just get Upper
or Lower Tray in the code. I actually do have the numbers for the printers
from our consultant who wrote the macro, but as we will probably be getting
new models, I would like to know where/how to get the actual bin numbers.
Thanks in advance. Tag: Identify the page you are on Tag: 80816
Capture ALL movements...event?
Currently I am trying to create my own StatusBar because the Word StatusBar
doesn't display when you are using it with Internet Explorer. My question is
what event do you use to capture every movement of the cursor(pointer) so I
can display the current line, section, column, etc...? I've tried
Me.SelectionChange but it only captures some of the movements. It doesn't
capture when I hit the Enter button, etc...
Any ideas? Thanks for your time!
--
Brenda Tag: Identify the page you are on Tag: 80814
Headers, Footers inserting text...
Hi,
I hope this is the correct forum for this question...
Is there some trick to programmatically inserting text in the header and/or
footer of a Word document? I'm working with Word 2003, and the documents are
XML format. I created a schema and a XML data file and a XSL transform file.
I pull the XML file into Word with the schema and XSL attached and everything
gets formatted and populated correctly except the header and footer. The
header and footer have the XML tags but the data that pops them isn't
present.
I need to be able to pop those header/footer tags programmatically but, they
don't get populated even when I open the files manually. Any ideas?
TIA!
David Tag: Identify the page you are on Tag: 80813
is it possible to create sequentialy numbering templets in word?
I am creating work order templets and I am wondering if there is any way to
generate a numbered identifier that will increase sequentialy as the work
orders are generated? Tag: Identify the page you are on Tag: 80812
Launch VBA form from toolbay buttom
I have made a VBA program & exported it out to a .frm. Is there a way to
create a toolbar button to run the .frm which in turn would run the code in
the background? Tag: Identify the page you are on Tag: 80801
Renaming a toolbar button
Is there a way to programatically rename a toolbar button?
Can I then access the name of that button as a string in another sub code?
thanks,
ck Tag: Identify the page you are on Tag: 80800
Template Creation
When creating a template for another user to fill in the blanks, how do you
format and fix template only allowing for the answers to be put in the
underlined blanks? Tag: Identify the page you are on Tag: 80796
Identify Capital Paragraphs with VBA for word.
Hi,
How can I identify a paragraph that has all word in captial letters in
Microsoft Word.
For example:
ROAD SAFETY SHOW
We had a road safety show and we were walking along the road. Suddenly
we started to dance and we got to know that a new ice cream shop has
opened up.
In the example above, I want to be able to identify "ROAD SAFETY SHOW"
and then have the text formatted as shown below.
#TITLE#ROAD SAFETY SHOW#/TITLE#
We had a road safety show and we were walking along the road. Suddenly
we started to dance and we got to know that a new ice cream shop has
opened up.
Can someone please help me with this?
Thanks,
Yash Tag: Identify the page you are on Tag: 80792
Speed in opening word documents and executing the word application
I work in an office with 25 users which were all "refreshed" with new
computers and upgraded to Windows XP Professional. All the applications open
immediatly with the exception of "Word". It takes around 20 seconds to
execute the application and about 45 seconds to open documents no matter how
small the size. This is frustrating as the previous version "Windows 2000"
was much faster. Most docs opened immediatly. Excell, Access, PowerPoint, in
XP, all execute upon a click of the icon so why is Word different. I have
called our helpdesk for assistance and believe they cannot figure this out or
my request has been buried. Does anyone have a clue as to why this is
happening?? Tag: Identify the page you are on Tag: 80790
Delete all shading
Alright, now... i only ask questions when i really need help... so here goes.
I have documents that have all this highlighting to help notify people of
issues that may or may not be problematic, so i have this-
Sub RemoveHighlights()
Dim rngSearch As Word.Range
Application.ScreenUpdating = False
Set rngSearch = ActiveDocument.Range
rngSearch.Find.ClearFormatting
rngSearch.Find.Replacement.ClearFormatting
With rngSearch.Find
.Format = True
.highLight = True
.Replacement.highLight = False
.Execute Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
Well, i get a document, and it turns out a programmer has added shading, not
highlighting.
I've tried all kinds of things to delete shading using a range, and i can't
figure it out. I searched through past threads and didn't find anything also.
If anyone could help it'd be much appreciated.
Thanks guys. Tag: Identify the page you are on Tag: 80789
ActiveDocument.Fields.Add - Setting Font Color and Hidden?
Is there a way to set the font when adding a new field?
Set newfield = ActiveDocument.Fields.Add(Range:=Selection.Range, _
Type:=FieldType, Text:=FieldText, _
PreserveFormatting:=PreserveFormat)
Add_Field = newfield.Index
Want to set the font to be hidden for this field? Tag: Identify the page you are on Tag: 80788
Disable AutoOpen macro after saving document
Hi,
I have a macro (below) that puts document
information in the header and footers of a document from an external
application which works
fine until the user saves the document then opens another document from
the same program when they subsequently reopen the first documnet it
now has the
second documents details in it which is what I want to stop! (The
information is written to the persons ini file on their C drive)
Is there any way to stop the macro from running once the document has
been saved? all the documents start with a name ~qw if thats any help.
The user can also open the documents from the intranet which doesn't
cause the same problem.
Sub nofooter()
'
With WordBasic
.NormalViewHeaderArea Type:=0
End With
'
End
End Sub
'
Sub HeaderLine()
'
Selection.HeaderFooter.Shapes.AddLine(93.6, 57.6, 504#,
57.6).Select
Selection.ShapeRange.Line.Weight = 2.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(128, 128, 128)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
End Sub
Sub footerlines()
'
Selection.HeaderFooter.Shapes.AddLine(93.6, 760#, 504#, 760#). _
Select
Selection.ShapeRange.Line.Weight = 3#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(150, 150, 150)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
'Second line !!
Selection.HeaderFooter.Shapes.AddLine(93.6, 780#, 504#, 780#). _
Select
Selection.ShapeRange.Line.Weight = 3#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(150, 150, 150)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
End Sub
Sub AutoOpen()
'
Dim MyDate
MyDate = Date ' MyDate contains the current system date.
With WordBasic
maxchar = 64
' modification D B 02/09/04 if document comes from IE then load
different INI file generated
If Left(Application.ActiveDocument.Name, 10) = "IEDownLoad" Then
Dim strIniName As String
strIniName = Left(Application.ActiveDocument.Name, 60) & ".ini"
Title$ = .[getPrivateProfileString$]("Document", "QWTitle",
"\\Appsrv2\QWBINI_Files\" & strIniName)
Ref$ = .[getPrivateProfileString$]("Document", "QWref",
"\\Appsrv2\QWBINI_Files\" & strIniName)
Rev$ = .[getPrivateProfileString$]("Document", "QWRev",
"\\Appsrv2\QWBINI_Files\" & strIniName)
Stat$ = .[getPrivateProfileString$]("Document", "QWStat",
"\\Appsrv2\QWBINI_Files\" & strIniName)
IDate$ = .[getPrivateProfileString$]("Document", "QWIssue",
"\\Appsrv2\QWBINI_Files\" & strIniName)
Typ$ = .[getPrivateProfileString$]("Document", "QWTYPE",
"\\Appsrv2\QWBINI_Files\" & strIniName)
Else
Title$ = .[getPrivateProfileString$]("Document", "QWTitle",
"qwcs.ini")
Ref$ = .[getPrivateProfileString$]("Document", "QWref", "qwcs.ini")
Rev$ = .[getPrivateProfileString$]("Document", "QWRev", "qwcs.ini")
Stat$ = .[getPrivateProfileString$]("Document", "QWStat",
"qwcs.ini")
IDate$ = .[getPrivateProfileString$]("Document", "QWIssue",
"qwcs.ini")
Typ$ = .[getPrivateProfileString$]("Document", "QWTYPE",
"qwcs.ini")
End If
'
' Get next issue date from RC ini file
NIDate$ = .[getPrivateProfileString$]("Document", "Nissue",
"\\appsrv1\qwb_pro\master\RC.ini")
'
End With
' check for short or long date format
Dim Findspace
Findspace = Mid(IDate$, 9, 1)
If Findspace = " " Then IDate$ = Left(IDate$, 8) Else IDate$ =
Left(IDate$, 10)
'
' Check to see if document status is ISSUED
Dim Issuestatus
Issuestatus = Mid(Stat$, 1, 6)
If Issuestatus <> "ISSUED" Then IDate$ = ""
'
With WordBasic
With ActiveDocument.PageSetup
'
.FooterDistance = 35
End With
header:
.StartOfDocument
.NormalViewHeaderArea Type:=0
.EditSelectAll
.WW6_EditClear
.Font "Arial"
.FormatFont Points:=14, Bold:=1, Italic:=0, Color:=0
.Insert " " + Title$
Call HeaderLine
'.StartOfDocument
'
footer:
'.StartOfDocument
.NormalViewHeaderArea Type:=0
.Font "Arial"
.NormalViewHeaderArea Type:=1
.EditSelectAll
.WW6_EditClear
.Font "Arial"
.FormatFont Points:=8, Bold:=0, Italic:=1, Color:=0
.InsertPara
'
'Can't use word basic for this
End With
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
'
' check to see if the document is a form, and if it is then exit !
'
'If Typ$ = "Form (F)" Then Call nofooter Else
With WordBasic
.Insert "Document administered by WPro. Uncontrolled copies valid
until the next document issue on " + NIDate$
.InsertPara
.InsertPara
'.CharRight 100
.Font "Arial"
.FormatFont Points:=8, Bold:=1, Italic:=0, Color:=0
.Insert "HFL " + Ref$
.Insert Chr(9) + "Revision " + Rev$
.Insert Chr(9) + "Page Number "
.InsertField Field:="page \*arabic"
.Insert " of "
.InsertField Field:="numpages"
.CharRight 10
.InsertPara
.Insert "Status: " + Stat$ + " (" + IDate$ + ")"
.Insert Chr(9) + "Issuing Authority: System Administrator"
.Insert Chr(9) + "Date Printed "
Selection.InsertDateTime
Call footerlines
.NormalViewHeaderArea Type:=0
End With
End Sub Tag: Identify the page you are on Tag: 80770
Macros error
when launching an MS word Macros Document " microsoft visual basic sub or
function not defined " Tag: Identify the page you are on Tag: 80769
About Sequentially numbered documents?
Hi
I didn't know anything about macros and VBA for nowadays but I want to make
my documents numbered sequentially and I looked at some related sites ( such
as http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm ). Also I read 70 pages
about my subject at this site :) I changed the code as the following for me:
Sub AutoNew()
Order = System.PrivateProfileString("\\server\Counter.Txt", _
"MacroSettings", "Order")
If Order = "" Then
Order = 1
Else
Order = Order + 1
End If
System.PrivateProfileString("\\server\Counter.txt", "MacroSettings", _
"Order") = Order
ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "00#")
ActiveDocument.SaveAs FileName:="\\server\DocumentName Ref-06-" &
Format(Order, "00#")
End Sub
As you can see In my document I have a Ref-06-XXX part and everytime I
opened the template document it adds one to Ref like â??Ref-06-001â??,
â??Ref-06-002â??, â??Ref-06-003â??... and also it creates the document at â??\\server\â??
like â??DocumentName Ref-06-001â??, â??DocumentName Ref-06-002â??, â??DocumentName
Ref-06-003â??...
But the problem is it saves the document after it opens the new numbered
document so if i made a mistake to open a new document i should delete the
last document that was created and also change the order number in the
â??Counter.txtâ?? to -1. I hope I had explained my problem well :) So I think
about the problem and have some answers like;
* Macro shouldn't save the document at the beginning (after the creation of
the new document). It would save the document after I made changes on the
document and I think that the document have that Ref number on it. So it
should save the document after I made my changes on document (before closing
the document).
As I said at the beginning I donâ??t know VBA codes so I need help from you. I
know that this is too easy for experts. Thanks for your help this very moment
:) Tag: Identify the page you are on Tag: 80764
Creating macro
Good day
Could someone please help me with a macro? I would like to paste text
unformatted into Word.
Thanks
--
Ansie Tag: Identify the page you are on Tag: 80761
modification to merge field before mail merge
In mail merge I need to split one field form datasource into 3 parts (string
will be separated by - sign) and put in different places in document. I can't
modify datasource, so I need to do this in word, probably using macros? Tag: Identify the page you are on Tag: 80758
Macro - not visible
I have a document with a macro attached which if I open on my machine I can
see and run however if I open the same document on another machine with same
level of macro security can't see the macro.
Any ideas why ? Tag: Identify the page you are on Tag: 80756
Quick & clean way to select all following chars until colorchange?
Hi,
I'm trying to select all characters which have the same color as a certain
character without any gaps
example: bbbbbbbbbbbbbbbbbbbbbb<cursor is
here>ggggggggggggggggggggggggggggggggggggggggbbbbbbbggggggggggg
From the position of the cursor I would like to select all the green (g)
charcters untill a blue (b) appears, so I don't want the second range of g's
for now.
at the moment I solve this by looping over the content and check the color
of each char. On a colorchange I'll select the chars of the old color. This
is pretty slow though and it seems primitive.
There has to be a better way....
Thanks in advance,
rVo Tag: Identify the page you are on Tag: 80754
How do I print only one page in a document on MS Office Word 2003
I have a word document of 31 pages. I want to print only one of these pages
(not the whole thing). When I select 'print', it just stars printing the
whole document. It doesn't offer me the selection of what page to print, like
I have in other applications.
Is there anyway to do this, (just tell the printer to print only 1 specific
page)???? Tag: Identify the page you are on Tag: 80746
Shortcut
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C62D02.8E3C0340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I posted the following in the DocManagement group to format words like =
Smith as S-M-I-T-H.
Sub myFormat()
Dim oRng As Range
Dim oChr As Word.Range
Set oRng =3D Selection.Range
oRng.Text =3D UCase(oRng.Text)
oRng.MoveEndUntil Cset:=3D"ABCDEFGHIJKLMNOPQRSTUVWXYZ", _
Count:=3DwdBackward
Set oChr =3D oRng.Characters.First
Do
oChr.InsertAfter "-"
Set oChr =3D oChr.Next
Loop Until oChr =3D oRng.Characters.Last
End Sub
I thought that I could use Cset:=3D"[A-Z]"
but it didn't work. I suppose that there is nothign wrong with =
"ABCD..." but was curious to know if there is a better way.
Thanks
--=20
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
------=_NextPart_000_0008_01C62D02.8E3C0340
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#f8f2d6>
<DIV>I posted the following in the DocManagement group to format words =
like=20
Smith as S-M-I-T-H.</DIV>
<DIV> </DIV>
<DIV>Sub myFormat()<BR>Dim oRng As Range<BR>Dim oChr As =
Word.Range<BR>Set oRng =3D=20
Selection.Range<BR>oRng.Text =3D UCase(oRng.Text)<BR>oRng.MoveEndUntil=20
Cset:=3D"ABCDEFGHIJKLMNOPQRSTUVWXYZ", _<BR> =20
Count:=3DwdBackward<BR>Set oChr =3D =
oRng.Characters.First<BR>Do<BR>oChr.InsertAfter=20
"-"<BR>Set oChr =3D oChr.Next<BR>Loop Until oChr =3D =
oRng.Characters.Last<BR>End=20
Sub</DIV>
<DIV> </DIV>
<DIV>I thought that I could use Cset:=3D"[A-Z]"</DIV>
<DIV>but it didn't work. I suppose that there is nothign wrong =
with=20
"ABCD..." but was curious to know if there is a better way.</DIV>
<DIV> </DIV>
<DIV>Thanks<BR>-- <BR>Greg Maxey/Word MVP<BR>See:<BR><A=20
href=3D"http://gregmaxey.mvps.org/word_tips.htm">http://gregmaxey.mvps.or=
g/word_tips.htm</A><BR>For=20
some helpful tips using Word.<BR></DIV></BODY></HTML>
------=_NextPart_000_0008_01C62D02.8E3C0340-- Tag: Identify the page you are on Tag: 80742
Hi,
I'm trying to write a bit of code that will obtain the page number that the
cursor is currently on.
Where do you want to report the page number? And do you want the page number
to be the page number you've assigned using the page number field? Or do you
want the page number to be the physical page number in the document. Also,
I'm not sure what's wrong with the page number information on the status
bar?
************
Hope it helps!
Anne Troy
www.OfficeArticles.com
Check out the NEWsgroup stats!
Check out: www.ExcelUserConference.com
"red6000" <red1000002001@yahoo.com> wrote in message
news:43ee3ccd$0$6999$ed2619ec@ptn-nntp-reader02.plus.net...
> Hi,
>
> I'm trying to write a bit of code that will obtain the page number that
> the cursor is currently on.
>
> Can anyone help?
>
> Thanks.
>
red6000 wrote:
> Hi,
>
> I'm trying to write a bit of code that will obtain the page number
> that the cursor is currently on.
>
> Can anyone help?
>
> Thanks.