word wrap
Hi
Is there some way to insert a word art (or graphic) in a macro procedure and
get it to wrap - the wrapping is the bit i don't seem to be able to get it to
wrap - the options in the toolbar are dimmed.
Thanks for your help
Yve Tag: How do I use VB properties to read a web tools form value? Tag: 88018
Style feature in Word 2003 has major flaws.
I have been using the Word style features since Word 97, and I have to say
that 2003 is the worst I have seen. I have used the style organizer, created
styles, and used those styles successfully. However, in this latest edition
it is almost impossible to use. I understand that some of the older versions
took some time to learn, which a lot of people don't care to do, so you tried
to make it so anyone could use it. Well all you did was make it so no one
can use it. I was using one of the styles I had created, and it just
randomly changed it toward the end of the document. Additionally, a feature
I used often was the "change style throughout document" is gone. That was
helpful if there was a glitch that suddenly shifted my tab, I could fix it
once and update the rest, but not anymore. Now if you make the slightest
change it creates a new style, which is indisernable to a previous one in the
menu, so it is impossible to know which one is correct.
I don't understand why you are dumbing down a program for people who will
tab 8 times to the side of the page rather than right justifing, or just
setting a tab.
Please create a feature that will work, even if it means people might
actually have to read some directions to learn it.
----------------
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=0c5a10f3-2e10-40d8-8ef6-81544b7782d6&dg=microsoft.public.word.vba.general Tag: How do I use VB properties to read a web tools form value? Tag: 88016
Updating Network-wide Templates
Hey, I'm trying to update a specific module in a custom template. I just
have to change a string in the module. However, I don't want to replace each
template for every single user since it is unique to each user. I would just
like to update the single module. I don't know if this is possible. Any
suggestions are greatly appreciated, thanks. Tag: How do I use VB properties to read a web tools form value? Tag: 88014
select next graphic
I hate to bother you with such a simple question, but I haven't been able to
get it to work.
I am trying to write a macro (so I can assign it to a key or button) that
will go to the next graphic and select it. Then I can execute another macro
I have written that copies it to Paint, reverses colors, and copies it back.
(If I can get the graphic selection working, I'll incorporate it into my main
macro.)
I can go to the next graphic, but I haven't been able to select it.
I used
Selection.GoToNext(wdGoToGraphic)
and when that didn't select the graphic, I tried
Selection.GoToNext(wdGoToGraphic).Select
but that didn't do anything different.
I've looked at help, and in this forum, but haven't been able to figure out
how to select the graphic.
Thank you Tag: How do I use VB properties to read a web tools form value? Tag: 88012
Bookmarks and modal dialogs
Here is my problem:
1) I am adding a menu to Word that displays a VB.NET Windows Form.
2) In the code for that windows form, I am creating new Word documents.
3) I am setting a bookmark in one of the new documents so the user is
returned to that document when processing is complete.
Step #3 does NOT work when I make the VB.NET Windows Form a modal dialog. It
does work correctly when the form is modeless.
Any idea why?
Any idea how to get it to work with a modal dialog? (The client wants these
dialogs to be modal.) Tag: How do I use VB properties to read a web tools form value? Tag: 88007
Option buttons to show text
HI,
I am trying to create a user form in word VBA that when pressing an
option button a certain text will appear in the document.
When pressing a different option button a different piece of text will
show.
this way the user will follow the qizard and will create a document.
Of course the text is a long string with screen shots and not just
text.
Any suggestions?
Thanks, Tag: How do I use VB properties to read a web tools form value? Tag: 88006
Can I alter the text colors in Word?
I would like to be able to modigy the text colors available in Word 2003,
similar to the way colors can be modified in Excel. Is there a way to do
this? If there is a way, can the modifications be incorporated in a startup
template? Tag: How do I use VB properties to read a web tools form value? Tag: 88001
Searching for Text
Hi. I have two main issues in creating my macro for Word.
I.)
I basically want to copy text that is located in between two strings of
text. Could you guys provide a simple macro for me to do that?
II). I want to know how I can specify a parameter in opening a file.
(I.e. Just changing four characters of the webaddress of the file.)
Thanks Tag: How do I use VB properties to read a web tools form value? Tag: 88000
How to extract .bookmark("Body").range.text WITH the formatting
Hello.
I need to take the body of incoming Word docs and store it in a database
field, but I need to keep formatting, like bold, tables, etc. How can I
extract the contents of the doc and keep the formatting, so that I can
recreate the doc later, when needed?
Thank you
Dave Tag: How do I use VB properties to read a web tools form value? Tag: 87997
How do I acess a table in the header programmatically?
I'm trying access through VBA an existing table in the header. I need
to pass a variable from another routine (that have completed and is
working).
The existing table is only 1 row with 2 columns (the RH cell has a
graphic in there that needs to stay there) I want to pass the variable
to the LH cell.
I have tried using the sections header.range.text but this just places
the variable underneath the table.
Many Thanks
Richard Jolly Tag: How do I use VB properties to read a web tools form value? Tag: 87994
Adding Line Numbers to a selection
Hello,
I am a developer. In my new company, I need to include my code in
documentation. So I create my documentation in Word and bring in code (from
another application) into a text box. Great.
Now they want line numbers.
So I paste the code into a blank page and go to line numbers. It changes
the indentation I had in my coding when it adds the numbers.
I am trying to write a macro to insert numbers, but can't seem to find how
to find the first row of a selection and the last row of a selection and just
loop through and insert a counter?!! I find many examples for a table, but
this is not a table. Not to mention the code for tables doesn't work for a
selection.
Example:
If CX_BUTTON2 = "T" Then
&GRIDLEVEL1 = GetRowset(Record.COMBO_DATA_BUDG);
&GRIDLEVEL1.HIDEALLROWS();
&GRIDLEVEL1 = GetRowset(Record.COMBO_DATA_TBL);
&GRIDLEVEL1.SHOWALLROWS();
Else
&GRIDLEVEL1 = GetRowset(Record.COMBO_DATA_TBL);
&GRIDLEVEL1.HIDEALLROWS();
&GRIDLEVEL1 = GetRowset(Record.COMBO_DATA_BUDG);
&GRIDLEVEL1.SHOWALLROWS();
End-If;
The above becomes
1. If CX_BUTTON2 = "T" Then
2. &GRIDLEVEL1 = GetRowset(Record.COMBO_DATA_BUDG);
3. &GRIDLEVEL1.HIDEALLROWS();
4. &GRIDLEVEL1 = GetRowset(Record.COMBO_DATA_TBL);
5. &GRIDLEVEL1.SHOWALLROWS();
6. Else
7. &GRIDLEVEL1 = GetRowset(Record.COMBO_DATA_TBL);
8. &GRIDLEVEL1.HIDEALLROWS();
9. &GRIDLEVEL1 = GetRowset(Record.COMBO_DATA_BUDG);
10. &GRIDLEVEL1.SHOWALLROWS();
11. End-If;
Not the same indentation. Can someone please tell me the code to just find
the first line of a selection and the last line of selection, so I can
iterate through the selection and put in line numbers?
Thanks.
Tony Tag: How do I use VB properties to read a web tools form value? Tag: 87987
Macro
I am creating a template based on forms....
How do I create a macro to
within the active document
remove protection
produce a dialogue box getting the user to "hilight relevant information"
bold (emboldens selection)
re-add protection to the document
end the macro
thanks for your help Tag: How do I use VB properties to read a web tools form value? Tag: 87982
Black Bands in web page when edited with MS Word
Hello all,
Using Windows XP Professional SP2 with MS Office XP SP 3 (MS Word 2002--10.6802.6735)
Does anyone know what is going on here? I created a Word doc by editing a web page (a show's episode guide) with Word to keep track
of the episodes that I've seen and haven't seen (http://www.epguides.com/farscape/).
When I first created this document, everything was fine. But the next time I opened it up, there were black bands throughout the
document. I tried to recreate the document by once again editing the web page with Word. And once again, the bands showed up. I
deleted all the text from the start of the first band to the end. They disappeared. I entered a bunch of blank lines and they
reappeared. The seem to be at regular intervals, but I have not counted to find out what those intervals are. These black bands
have nothing to do with "Shading" (Format>Borders and Shading...). The text is unreadable since it is the same color as these
bands. In order to read text within these band, I have to change the color or apply some sort of shading. I would rather not do
that, I would like to know what is causing these bands and remove them if possible.
Has anyone experienced this before? Does anyone know how to remove these bands?
The file can be found here: http://home.att.net/~ctbarbarin/files/farscape_epguide.doc for those of you that trust me. I have
removed all code from this document (In Word/Normal.dot I have a keyboard shortcut set for Strikethrough Font Effect--In the
original file still on my machine, the only code I have in this file is for a message box that pops up when the file opens reminding
me of that keyboard shortcut--that code has been removed from the file that is online). I am curious to know if these black bands
show up on anyone else's computers.
Thanks for any help anyone can provide,
Conan Kelly Tag: How do I use VB properties to read a web tools form value? Tag: 87974
word 200 macro
Greetings,
I am attempting to write a macro to clear all headers in a document, then
turn off line numbering for the whole document. The following macro clears
the headers ok, but gets an "out of range" error at the line numbering part.
I would greatly appreciate any assistance.
Dim oSec As Section
Dim oHead As HeaderFooter
For Each oSec In ActiveDocument.Sections
For Each oHead In oSec.Headers
If oHead.Exists Then oHead.Range.Delete
Next oHead
Next oSec
ActiveDocument.PageSetup.LineNumbering.Active = False
End Sub Tag: How do I use VB properties to read a web tools form value? Tag: 87973
J West: Using Word capabilities in Excel and vv?
In a previous thread I posted here and to vbscript, I was explaining that I
was trying to use a script to get some functionalities offerred by Word to
work in Excel and vice versa. The instance I was working on was a wildcard
text search in Excel; the only way I could find to make it work was to read
each cell in Excel into a string, open a Word doc and write in the string,
perform the search, then write the answers back into Excel. It worked, but
was very kludgy.
Jonathan West commented in that thread that there are better ways to
cross-utilize functionalities across applications, and keeping everything
within VBA is better than calling an external script and passing variables
back and forth. (I was trying a script to use a RegExp text search. I have
since let that slip down the list of things to work on.)
I have the utmost confidence in Jonathan's wisdom and experience, and would
like to see if we might be able to explore this further. Thinking about it,
there seems to be no reason why I can't instance Word's Find object and use
the built-in wildcard search capabilities from within an Excel macro. I'm
not quite so sure about using Excel's AutoFilter or Data Validation on a
Word table, though, but it would be very nice.
What are the limits and boundaries here in trying to cross-utilize
functionalities like this? Is it worth pursuing?
Ed Tag: How do I use VB properties to read a web tools form value? Tag: 87972
Word should have option for workbook tabs like Excel
I use office 2004. If word had the ablilty to be used as workbook it would
increase its user friendliness in the following ways:
1- make it easier to print only the page you wanted because you would list
related information in a separate tab
2- Access to different "chapters", cover pages, indexes very quickly. Ex:if
you are typing a book.
3-Storing related document information for quick access. Ex: Meeting agendas
-as a manager you could store all previous meeting agendas in same workbook
and easily tab back and forth without having to open different files or
create new page breaks within the same file and then print only the page
needed.
4- Copies of letters sent to clients- you could have a record of all
correspondence with someone within the tabs of a workbook file.
----------------
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=41ac6dbf-a2f3-4a79-868c-80d3ebd3389e&dg=microsoft.public.word.vba.general Tag: How do I use VB properties to read a web tools form value? Tag: 87969
Modifying the right click menu
Is there a way to add "Paste Special" to the right click menu in Word2003??
Being able to select "Paste Special" in Excel97 is such a handy
functionality, that I was surprized that it had not become a standard
functionality in Word2003. Is it available in more recent versions of Word??
Regards, JDDomine 20060710 Tag: How do I use VB properties to read a web tools form value? Tag: 87966
Insert a selection at the end of a Word Document
Hello,
I am creating a userform that takes a string and adds it to the end
of a different word file. For example, the current file has a text
string inputted from the user via the form, and I need to take that
string, then transfer it over to a existing file that already has text
in it and paste it at the end. Any help would be appreciated.
Rob Tag: How do I use VB properties to read a web tools form value? Tag: 87964
Duplicate Office Word 2003 documents
My Office Word 2003 keeps making unwanted duplicate copies of Word documents,
in particular e-mails copied from Outlook Express to Word, which are work
related -marine survey files.
The duplicates seem to be made automatically after the e-mail files have
been copied into Word folders.
I have been making these copies for over 6 years, but the problem only
started last January and I have not been able to correct / stop it. Does
anyone have any ideas?
Regards, David Moore Tag: How do I use VB properties to read a web tools form value? Tag: 87963
Avoid "Open Worksheet" dialog
I am opening an Excel spreadsheet in Word, and I want to avoid the "Open
document in Workbook" dialog in which I have to select "Sheet 1." How can I
avoid getting that dialog (and just open Sheet1 automatically)? (Do I
modify the format (at Format:=wdOpenFormatAuto???)) (All my code is in
Word, and I'm only using Excel as the repository so I can work with it in
Word.)
Here's the code I'm using to open the spreadsheet in Word:
Application.DisplayAlerts = wdAlertsNone
Documents.Open FileName:="c:\4raw.xls", ConfirmConversions:=False,
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
Application.DisplayAlerts = wdAlertsAll
TIA Tag: How do I use VB properties to read a web tools form value? Tag: 87962
Insert Excel graphs into the fields of a locked Word form.
As part of our high school lab course, students collect data, graph it, and
add it to their Word form labs. If the form is locked, students cannot insert
the graph into the form field. This creates lots of confusion and is
inconvenient for both us and our students.
----------------
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=1441a4b8-bdd4-4b0d-8915-4930b5b73172&dg=microsoft.public.word.vba.general Tag: How do I use VB properties to read a web tools form value? Tag: 87959
Access hyperlinks in a locked Word form.
We use locked Word documents for labs we give to high school students. The
labs frequently contain hyperlinks which cannot be accessed unless the form
is unlocked. Locking and unlocking creates confusion. This seems like an
easily fixable problem.
----------------
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=4c730d4c-f140-44ef-b511-5f000136adfb&dg=microsoft.public.word.vba.general Tag: How do I use VB properties to read a web tools form value? Tag: 87958
Take a sting and set it as text in a userform label
Hello,
I was wondering if there is a way in VBA to take a string set it as
the text in a label for a userform rather than use the IDE to enter it
through the properties window. To be more specific, I am reading cells
from a Word Table and storing them as strings, then the user gets a
list of the cells contents in the userform presented as labels next to
checkboxes. Thanks in advance for any help you can send my way.
Rob Tag: How do I use VB properties to read a web tools form value? Tag: 87952
Field code to display numbers and text
I want to display both number and text in a word document using an excel file
as my database.
The data is mostly numeric "0.041" but some are "<0.010", the latter
displays as 0.00 when I apply a field code of ......\# "0.000" to round
numbers to three decimal places. Tag: How do I use VB properties to read a web tools form value? Tag: 87948
The Mysterious ^p and CR/LF
I'm trying to unravel the mysteries of the ^p "character" and trying using
search and replace.
I have numerous ASCII text files. They unfortunately have solitary CR
characters (Hex 0D) buried in the text, often in series, as well as the
standard CR/LF. So, I thought I would use word to delete them. It's turned
out to be a bigger task than I thought.
These Hex 0D characters are shown in Word two ways using the Courier New font:
1. In the middle of a line, it appears as a box.
2. At the end of a line, it disappears next to the end of line marker even
when the show formatting marks is turned on, so you can never really see
them. A hex dump shows the characters to be Hex 0D0D0A.
I have huge files I have to process, so I've made myself a macro to try to
delete these evasive little characters. But it's been rather difficult.
But here's one process I created that sort of works. It's a three pass
routine:
1. Replace all LFs with a character string of "~~~%". This method exposes
all the solitary CRs and Word internally coverts their display to paragraph
marks.
2. Next step is to delete all the solitary CRs.
3. Finally, revert the true end-of-line markers "~~~%" back to "^p" and we
are done.
After that, the appearance of the text is correct and all the solitary CRs
are gone. But there's a catch. All the CRs are now solitary CRs in the code
and are no longer CR/LF even though it displays correctly. And I don't see a
way to convert them back using a macro. I've tried replacing ^p with ^13^10,
but that just adds an extra box character. Maybe it doesn't matter after the
text file is saved.
I'm stumped. I'm stumped. Is there a better way?
--
.. jim ..
(I was having connection problems, I hope this message didn't post twice.) Tag: How do I use VB properties to read a web tools form value? Tag: 87947
VBA Code to Return To Form
I am a novice -- using the following code for "vbYes", what code needs to be
added to return to the form after clicking "yes" on the message box?
Dim intMsgBoxResult As Integer
If intMsgBoxResult = vbYes Then
Selection.GoTo What:=wdGoToBookmark, Name:="lbl1"
Selection.TypeText frmLabels.txtRecipientName & vbCrLf
Selection.TypeText frmLabels.txtRecipientAddress
Application.ScreenUpdating = True
Else
intMsgBoxResult = vbNo
Selection.GoTo What:=wdGoToBookmark, Name:="lbl1"
Selection.TypeText frmLabels.txtRecipientName & vbCrLf
Selection.TypeText frmLabels.txtRecipientAddress
Application.ScreenUpdating = True
Application.Windows(curDocument).Activate
ActiveWindow.SetFocus
With ActiveDocument
For Each mark In .Bookmarks
.Bookmarks(mark).Delete
Next mark
End With
Unload Me Tag: How do I use VB properties to read a web tools form value? Tag: 87946
VBA Printing Problem
Hello all,
because we have multiple printers , we have created a macro which is
assigned to a button in the toolbar to directly print to a printer. this is
easy because we don't have to go to file, print and then select a printer.
The only thing that happens is that MS Word is no longer responding. I will
post the code here can anyone help me.
code:
Sub secprint()
ActivePrinter = "pdf"
Application.PrintOut Range:=wdPrintAllDocument,
Item:=wdPrintDocumentContent, Copies:=1
End Sub Tag: How do I use VB properties to read a web tools form value? Tag: 87944
Delete double-mouseclick on a symbolbar icon
Hello,
I have a macro assigned to a button in a word XP-symbolbar-icon. A lot
of my users learned in windows to double-click so they always
double-click on the button to execute the macro. Because of the
double-click the macro runs twice. The user doesn't understand why not
double-click. It's hopeless to explain it. I want to catch tis error in
my macro: after the first click the macro is executed. At the end I
want to clear the click/keyboard-buffer to get rid of the second click.
How could this be done?
Thanks
Stefan Westner Tag: How do I use VB properties to read a web tools form value? Tag: 87937
starting word from a macro with a Template other than Normal.dot
Hello,
Can anybody help me on how to start and open a new Word document using a
newly defined template other than Normal.dot? I tried net start winword
<xxxx.dot but did not work only a new word was opened using Normal.dot.
--
Jeff B Paarsa Tag: How do I use VB properties to read a web tools form value? Tag: 87918
Changing the default formatting for Word's standard buttons
Can anyone help me figure out how to change the default formatting for the
bullet and numbered list buttons on Word's formatting toolbars? I have
created my own toolbar with both a bullet and numbered list button, but
having both confuses all the end users. I removed the standard buttons, but
the users then get confused as to why sometimes they are there (when they use
normal.dot) and sometimes they aren't (when they use my template). A mutiny
is pending... unless I can just change how things look when I use Word's
standard buttons!
Thanks in advance.
--
cmbrown Tag: How do I use VB properties to read a web tools form value? Tag: 87907
Doc property into another document
I know this is the programming group, but I hope one of you generous people
will know this.
I have 2 documents, A and B. I am interested in putting a doc property of
Doc
A into Doc B.
I think a field reference would be good, but I have only found references
for bookmarks, not doc properties.
Any recommendations?
Thanks Tag: How do I use VB properties to read a web tools form value? Tag: 87905
gross lines
I need to know how to change a "gross line" into a "65 character line
including spaces" for medical transcription. Any suggestions?
Thanks Lori Tag: How do I use VB properties to read a web tools form value? Tag: 87901
DocVariables - Copy / PasteSpecial
I populate a word doc from an excel spreadsheet using doc variables.
This document will enventually go to a client, so I would like the
DocVariables "removed", while keeping the values themselves. similar
to a copy / pastespecial / values works in excel.
I can accomplish this manually in word by highlighting the variable,
hitting copy / paste special / unformatted text. However, when I try
to do so in VBA, it seems to simply copy back the DocVariable.
Here is the code:
set wrdApp = Word.Application
Dim myField As Field
For Each myField In ActiveDocument.Fields
Debug.Print myField.Code
myField.Result.Select
wrdApp.Selection.Copy
wrdApp.Selection.PasteAndFormat (wdFormatPlainText)
Next
Why would this work manually, but not via VBA? I've tried other
(wdFormat...) options, but with the same result.
Thanks for any help!!! Tag: How do I use VB properties to read a web tools form value? Tag: 87896
Need to add .png or .ico icons to the .dll
I created toolbar for my macros i need to put icons instead of text buttons.
When I copy/paste icons quality will be lost ,look is not sharp enough.(bmp).
I created icons in (png,ico) fromat with magenta(255,0,255) color with is
used by
windows as trasparent color.
Q: how can I add icons to the .dll?
Q:in which .dll
Q:Can I add it to my own dll and then insert reference in my .dot on
myown.dll.
Ps: some tutorial would be useful
thanks in advance
acherony Tag: How do I use VB properties to read a web tools form value? Tag: 87892
VBA count of mis-spelled words?
How can I get a count of mis-spelled words in a document, using VBA?
Basically, the number of words with the red squiggly underline, although
related errors like mixed capitalization would also be of interest
especially if I could keep that count separate from the basic count of
mis-spelled words.
Thanks!
--
The enclosed questions or comments are entirely mine and don't represent the
thoughts, views, or policy of my employer. Any errors or omissions are my
own. Tag: How do I use VB properties to read a web tools form value? Tag: 87888
Make a drop down field compulsory & create another
I have a drop down field in a Word form that must be completed either Yes or
No. If the answer is Yes the user must select from a further list of options
before proceeding to fill in the rest of the form. If the answer is No the
user can proceed to fill in the form.
1. How do I make the dropdown field compulsory (they can't move on until
something is completed I have a blank field in the dropdown so they shouldn't
just leave it blank)?
2. How do I generate another dropdown list if they answer Yes?
I am presuming VBA is the way to go but I am a VERY novice user of VBA Tag: How do I use VB properties to read a web tools form value? Tag: 87885
ChangeFileOpenDirectory reverts template???
Hi,
I'm having this bizarre problem with some of my documents:
I have two Word documents opened, Doc 1 and Doc2, both with attached
templates.
1. I change the attached template to Doc2 (UI or AttachedTemplate
property by code, the result is the same), setting the full path (not
default), not just the name.
2. I save Doc2.
3. On Doc1 (based on a precise template one, this doesn't happen for
all documents) I change de file open directory programatically
(ChangeFileOpenDirectory method)
--> Attached template to Doc2 doesn't change.
4. Close and re-open Doc2
--> Attached template to Doc2 reverts to what it was previously. If I
attach several templates in a row it always "remembers" the one before
the last one.
Does anyone have an explanation for this?
What could be happening?
Why is this only happening whem issuing the ChangeFileOpenDirectory
from documents (Doc1) based on this one exact template?
What should I search for in the code of this template that can be done
wrong?
Although I have quite some experience with VBA, I did not write most of
the code myself, so I really have no idea where to start searching. (I
was asked to add a macro that would attach a template to all files in a
folder, which I did looping all documents in the folder, opening,
setting the AttachedTemplate to the full path of the template file,
saving and closing, which should be pretty standard).
Thanks for any help you can give
Tiago Tag: How do I use VB properties to read a web tools form value? Tag: 87880
prinitng selctions
i need to print from page 1 to page n
page n is te one in which i find text "Chapter 2"
as my selection is located at chapter 2 (page 7 for example, but not always
7!))
how can i use ActiveDocument.PrintOut Range:=wdPrintFromTo, From:="1",
To:=n ??
how can i know in vba the current page number?
i need to use this for printing from chpater 1 to last page of chapter 1
then same for chpater 2 and 3
tya Tag: How do I use VB properties to read a web tools form value? Tag: 87879
Word 2000 - fade edges of photo inserted in document
Word 2000 bulletin in progress: have a photo Dad wants to fade the edges on
for cover (oval, square shape etc). He has done this previously years ago but
can't remember how he did it, or which program. I've tried Picture Editor and
see no such effect, same for Paint (all XP 2000 versions).
Can anyone give tips on how one might do this?
--
AJ Tag: How do I use VB properties to read a web tools form value? Tag: 87875
Field Codes
I am trying to add a field code in word to pull from our public folder
contact list. ie, company names, numbers, addresses....so when the user goes
to this document and clicks on the "to" it's pulls from outlook contacts.
Does anyone know the best way to accomplish this task? thanks in advance. Tag: How do I use VB properties to read a web tools form value? Tag: 87870
DocumentBeforeSave Event error
Hi, everybody.
I am trying to move file from one folder to another, back and forth
depending on user's actions.
However, when the move file procedure is triggered by the DocumentBeforeSave
event, Word shuts down completely with the message
"Microsoft Office Word has encountered a problem and needs to close. We are
sorry for the inconvenience",
and I am not able to trap this error.
File is successfully moved if the sub is called by subs other than
DocumentBeforeSave.
Please help. I have spent close to 2 weeks on this problem. Tag: How do I use VB properties to read a web tools form value? Tag: 87869
Font Substitution
Hello
OS: Windows XP
App: Word XP
I would like to obtain some VBA that will permanently convert all
Substituted Fonts to "Times New Roman". The code below will permanently
convert a single known substituted Font. I am looking for VBA that will loop
through all Substituted Fonts.
Application.SubstituteFont UnavailableFont:="Times New Roman Bold",
SubstituteFont:="Times New Roman"
PLease don't burn too much midnight oil on this one, however, a result would
be outstanding.
Regards
Mike Tag: How do I use VB properties to read a web tools form value? Tag: 87867
Can't Merge Cells in Word after Splitting and deleting
Hi, I will try to explain my problem the best I can. I have a table
and the first column's text went with 6 rows (in the 2nd column) so the
first column was merged to show this. I split cells in the first
column to go with the 6 adjacent rows, then I deleted some rows, and
tried to remerge the first column and it won't give me the option to
merge. I can merge some of the cells, but can't merge the ones that
went above the rows I deleted. Any information on how to fix this
problem would be greatly appreciated!
Thanks! Tag: How do I use VB properties to read a web tools form value? Tag: 87864
DAO OpenRecordset in Word 2000 VBA returns nothing
I'm having an unusual problem with DAO and VBA in Word 2000. Here's the
problem code:
set myRecord = myDatabase.OpenRecordset(someQuery)
"myDatabase" is an open database connection to an Access database file
(mdb file), "myRecord" is a Recordset object, and "someQuery" is an SQL
query string; e.g. "select * from thisTable where thisField=SomeValue"
The problem is, if "someQuery" returns 0 (zero) rows, then myRecord
isn't "set" - it remains uninitialized. Later on in the code, a test
like this is used:
do while myRecord.EOF = False
' do something
loop
This causes a problem in Word 2000 (but not later versions of Word)
because "myRecord" is not set, so you get a "object variable or with
block variable not set" error.
My question is this: is the behavior of "OpenRecordset" different under
Word 2000's VBA? Or have I been wrong all this time in assuming that if
the query passed to OpenRecordset returned 0 (zero) rows, it would at
least return an empty (i.e. EOF=True) recordset? Or is this maybe just
a strange problem with a particular installation of Word/VBA/JET/DAO? Tag: How do I use VB properties to read a web tools form value? Tag: 87859
CTRL+Tab Gives VB Error
Word 2003
I have a user who has reported a strange problem in Word. I have my
doubts as to whether or not this problem is caused by Word, but since
the user is getting a VB error in Word, I thought that I would start my
research by posting the problem in this group.
When the user hits CTRL+Tab she gets the following VB error.
Error 91: Object variable or With block variable not set
The user also uses a program called CrossEyes, which is supposed to be
like the WordPerfect Reveal Codes command for Word. The user has
noticed that if she opens CrossEyes and then closes it, she can then go
in to Word and use CTRL+Tab without getting the VB error. This leads me
to believe that one of my least favorite programs--CrossEyes--is the
real culprit. Has anyone seen this problem before, or have an idea of
what might be causing the error?
--Tom
P.S.
I detest CrossEyes because the information that it gives is of limited
use, not always accurate, and the program has become a crutch for our
old WordPerfect users by helping them to continue to think in terms of
how WordPerfect does things, which just prevents them from ever truly
understanding Word. But that's just my opinion. Tag: How do I use VB properties to read a web tools form value? Tag: 87854
My Microsoft Word is askin me to convert? What do I do?
I am tryin to use my Microsoft Word and a little box would pop up abnd say I
need to convert. then it ask for a 16 digit number but i dont have a number
and I dont have a program i bought my computer but the program was already on
the computer. I need a 16 digit number. what do i do? Tag: How do I use VB properties to read a web tools form value? Tag: 87853
Hidden rows appearing on open
I'm using the following VBA to hide rows based on the selected checkboxes.
However, if I close the document and then reopen it, the hidden rows appear,
but sort of squashed. Any ideas?
Sub AutoOpen()
Dim myArray1() As Variant
Dim myArray2() As Variant
myArray1 = Array("Regular", "24 Hour Priority", "Same Day Urgent")
With ComboBox1
.Clear
.List() = myArray1
End With
myArray2 = Array("Test1", "Test2", "Test3")
With ComboBox2
.Clear
.List() = myArray2
End With
End Sub
Private Sub CheckBox1_Click()
CheckBox1.Font.Bold = CheckBox1.Value
If CheckBox1.Value = False Then
CheckBox1.Font.Size = 10
ActiveDocument.Tables(1).Rows(2).Range.Font.Hidden = False
Else
CheckBox1.Font.Size = 12
ActiveDocument.Tables(1).Rows(2).Range.Font.Hidden = True
End If
End Sub
Private Sub CheckBox2_Click()
CheckBox2.Font.Bold = CheckBox2.Value
If CheckBox2.Value = False Then
CheckBox2.Font.Size = 10
ActiveDocument.Tables(1).Rows(1).Range.Font.Hidden = False
With ActiveDocument.Tables(1).Rows(2).Borders(wdBorderTop)
.LineStyle = wdLineStyleDot
.LineWidth = wdLineWidth025pt
.Color = wdColorGray25
End With
Else
CheckBox2.Font.Size = 12
ActiveDocument.Tables(1).Rows(1).Range.Font.Hidden = True
With ActiveDocument.Tables(1).Rows(2).Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth225pt
.Color = wdColorBlack
End With
End If
End Sub
Private Sub CheckBox3_Click()
CheckBox3.Font.Bold = CheckBox2.Value
If CheckBox3.Value = False Then
CheckBox3.Font.Size = 10
ActiveDocument.Tables(1).Rows(1).Range.Font.Hidden = False
With ActiveDocument.Tables(1).Rows(2).Borders(wdBorderTop)
.LineStyle = wdLineStyleDot
.LineWidth = wdLineWidth025pt
.Color = wdColorGray25
End With
Else
CheckBox3.Font.Size = 12
ActiveDocument.Tables(1).Rows(1).Range.Font.Hidden = True
With ActiveDocument.Tables(1).Rows(2).Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth225pt
.Color = wdColorBlack
End With
End If
End Sub
Private Sub CheckBox4_Click()
CheckBox4.Font.Bold = CheckBox2.Value
If CheckBox4.Value = False Then
CheckBox4.Font.Size = 10
ActiveDocument.Tables(1).Rows(1).Range.Font.Hidden = False
With ActiveDocument.Tables(1).Rows(2).Borders(wdBorderTop)
.LineStyle = wdLineStyleDot
.LineWidth = wdLineWidth025pt
.Color = wdColorGray25
End With
Else
CheckBox4.Font.Size = 12
ActiveDocument.Tables(1).Rows(1).Range.Font.Hidden = True
With ActiveDocument.Tables(1).Rows(2).Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth225pt
.Color = wdColorBlack
End With
End If
End Sub
Private Sub CheckBox5_Click()
CheckBox5.Font.Bold = CheckBox2.Value
If CheckBox5.Value = False Then
CheckBox5.Font.Size = 10
ActiveDocument.Tables(1).Rows(1).Range.Font.Hidden = False
With ActiveDocument.Tables(1).Rows(2).Borders(wdBorderTop)
.LineStyle = wdLineStyleDot
.LineWidth = wdLineWidth025pt
.Color = wdColorGray25
End With
Else
CheckBox5.Font.Size = 12
ActiveDocument.Tables(1).Rows(1).Range.Font.Hidden = True
With ActiveDocument.Tables(1).Rows(2).Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth225pt
.Color = wdColorBlack
End With
End If
End Sub Tag: How do I use VB properties to read a web tools form value? Tag: 87851
I have already read used VB properties to read a form field value. However,
I can't find the properties to use to read a web tool form value. Any ideas?
> I have already read used VB properties to read a form field value. However,
> I can't find the properties to use to read a web tool form value. Any ideas?