Limit bullet and numbering choices
Hi,
I'm working on a template that is to be used to create a standard word
document report customised for the use of our company. When it comes to
bullet and numbering, my question is whether there are any ways of limiting
the choices here. This is to prevent different users from selecting different
bullet points in report making process. Hence, i was thinking if there is
only one choice there for them to use, then users would have little options
to go for a different one. Is there any coding involved here? or it this
possible?
BTW, i use office 03.
Thank you in advance Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114624
Good Word VBA Book?
Greetings:
The more I read the information that is on this discussion group, the more I
realize I do not have a very strong base. Could you recommend a book or two
that would provide a good knowledge of Word VBA. I am very proficient in
Excel VBA and somewhat proficient in Access VBA. But woefully inadequate in
Word.
Thank you,
SoCal Rick Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114623
Disable Customize Toolbar
Hi, I want to programmatically disable the "Customize..." whenever I
right-click in MS Word 2003? Is that possible? Thanks Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114621
How to break textlinks to Excel in WORD2000 by a macro or VBA?
I made a WORD 2000 template in which there are a few textfields that get
there information in cells of an excel file. Once the data is in the WORD
doc, this doc should live is own life without the Excel file.
In a manual way this is easy to perform: select all, edit, links, break link.
When I record these operations, the macro does not register these operations.
Neither does it in a template or a simple .doc file.
Does anyone know a solution? An appropriate VBA code is also OK!
Thanks a lot!
Patrick Paluselli Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114615
Can the textboxes be treated as an array of elements?
Hi,
I have added a number of textboxes in a userform. They range from
textbox1 to textbox15. The coding will become cumbersome if I code
the 15 textboxes separately. For example, to initialize the 15
textboxes, I need to write
textbox1=""
textbox2=""
...
textbox15=""
May I ask if there is a way to treat the textboxes as an array of
elements like
Dim textbox(1 to 15)
To initialize, I only need to write
for i=1 to 15
textbox(i)=""
next i
Thanks
Mike Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114612
Word/Character Count for a Group of Documents
Does anyone know where I could find some VBA code that would help me extract
the word and character counts for a group of Word documents in a given
folder? Ideally, I would like to extract this information and have it go
directly into a new document (in a table preferably). The table would look
something like the following.
File Name Word Count Character Count
xx1.doc 5,204 25,000
xx2.doc 7,500 39,500
etc.
Thanks in advance for any help/pointers. I'm assuming others have had a
similar need in the past and someone has already solved this problem. By the
way, I'm using Word 2003 under XP both with SP2.
Brian Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114610
Passing Arrays ByVal or ByRef?
As a habit, I normally pass variables to functions "ByVal." But I was
wondering if it was faster/better to pass an array "ByRef" even if one wasn't
planning to modify its contents? Doesn't "ByVal" create a new array of the
same size?
Also, it appeared to me that to pass an array, one has to use a Variant
variable, is that correct?
The following code seemed to work as expected.
Sub ArrayTest()
Dim arrayX(4 To 99) As Byte
arrayX(4) = 11
arrayX(5) = 99
Call PassArray(arrayX, arrayX)
MsgBox arrayX(4)
MsgBox arrayX(5)
End Sub
Function PassArray(ByVal arrayY As Variant, ByRef arrayZ As Variant)
MsgBox "The Bounds of this array is: " & LBound(arrayY) & " and " &
UBound(arrayY)
MsgBox arrayY(4)
arrayY(4) = 66
arrayZ(5) = 88
End Function
Steven Craig Miller Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114606
Userform to Doc to Access
Hi,
First let me tell you I really appreciate Doug, Jean-Guy and all the other
MVPs. You've already made my life much easier.
Now I have a question. I have a Word Template that has text boxes, check
boxes and option buttons. The file is sent via email to hundreds of users.
[Should they receive this as a Template or a Document?]
When the user finishes filling out the user forms, they run a macro that
transfers the data to {DOCVARIABLE} fields in Word Template. The user prints
the document, saves it and emails it back. I thought I could also save it as
a "Fields" text document to get the answers, but the {DOCVARIABLE} fields
don't save.
What is the most efficient way to get the user's answers so they can be
loaded into Access?
I am sorry to have to ask you all for help here, but I am simply lost.
Thank you
SoCal Rick Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114593
calling procedure outside module
I need to look for a variable value that is filled when my document is
opened.
How to access to it?
I've tried something but it does not work - for example:
if vairable, named "location" is filled with document path just when
document is opened and latter i need to know what is in my variable, how to
write it?
thanks for any suggestion
Ivor Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114590
Applying Styles to Text
How do you apply a Style and then switch back to normal. I want to insert a
heading say "Summary". I want to apply a normal style to this, and then have
a carriage return and the switch to the Normal style. The code below does
provide a carriage return not does it switch the style.
MyDoc.Range.Style = "Normal"
MyApp.Selection.TypeText "Summary"
MyDoc.Range.Style = "Heading 1"
MyApp.Selection.TypeText "Other Text"
Thanks
EM Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114584
Prevent changes to a document
I have a document that serves as a template, and I don't want users to be
able to change it. I thought about having a "Save As" dialog box appear upon
opening. This would at least prompt the user to save the document to another
location prior to making any changes, thereby protecting the integrity of the
original document. (By the way, I don't know how to do this!)
Anybody have any other ideas? Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114583
Setting an Object to a Word Table
I have inserted a table:
MyApp.ActiveDocument.Tables.Add Range:=MyApp.Selection.Range, numrows:=5,
numcolumns:=5
How do I pass this table to an object variable using the Set stmt?
Set objTable = MyApp.Table(1) does not work.
Thanks
EM Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114580
Help Tweaking a Macro
I am trying to run this Macro that removes the same password from multiple
Word files, but I don't know programming and I need to know where to insert
the existing password to unlock each file.
Public Sub UnPasswordALL()
Dim FirstLoop As Boolean
Dim strFileName As String
Dim sPassword1 As String
Dim sPassword2 As String
Dim strPath As String
Dim oDoc As Document
Dim Response As Long
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select Folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show <> -1 Then
MsgBox "Cancelled By User", , "Password"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) <> "\" Then strPath = strPath + "\"
End With
sPassword1 = InputBox("Enter Password to open Document")
sPassword2 = InputBox("Enter Password to edit Document")
On Error Resume Next
Documents.Close saveChanges:=wdPromptToSaveChanges
FirstLoop = True
strFileName = Dir$(strPath & "*.doc")
While strFileName <> ""
Set oDoc = Documents.Open(strPath & strFileName,
PasswordDocument:=sPassword1, WritePasswordDocument:=sPassword2)
If FirstLoop Then
With ActiveDocument
.Password = ""
.WritePassword = ""
End With
FirstLoop = False
Response = MsgBox("Do you want to process" & "the rest of the files in
this folder", vbYesNo)
If Response = vbNo Then Exit Sub
Else
With ActiveDocument
.Password = ""
.WritePassword = ""
End With
End If
oDoc.Close saveChanges:=wdSaveChanges
strFileName = Dir$()
Wend
End Sub
Thanks
--
Bruce Bumbier Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114578
Inserting Footer in Word Doc
I am inserting page breaks as follows:
MyApp.Selection.InsertBreak Type:=wdPageBreak
I want to set up the footer. When I record using the VBA recorder I get this:
Selection.Selections(1).Footers(1).PageNumbers.Add PageNumberAlignment:= _
wdAlignPageNumberCenter, FirstPage:=False
How do I modify this using the the MyApp variable name from the first
example? That is MyApp.Selection.Selections(1) does not work.
Thanks
EM Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114577
Syntax error
I keep getting a syntax error on the following:
MsgBox "The HRA Start Date must be later or _
equal to the Benefit Period Start Date"
I read you need a space and an underscore to go to the next line when typing
code. If I take the space and underscore out and put it all on one line it's
fine. This isn't a long line but some will be and I'd like to know how to do
this. It stops on the word equal. Thanks Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114571
Insert Table into Word Doc
Why does the following not work?
Public Sub PrintErrorReportToWord()
Dim wordApp As Object
Set wordApp = CreateObject("Word.Application")
wordApp.Visible = True
With wordApp
.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
3, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitWindow
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With
End With
End Sub
Thanks
EM Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114569
Change Names
I can't change the name...it's ambiguous. I have a user form with an option
group called frmBalTrackAggEmbed1. It has two options that are called
optBalTrackAgg1 and optBalTrackEmbed1. Originally these existed without the
1 behind them but were accidentally deleted. They were then recreated but I
couldn't use the same name again because it was ambiguous so the 1 had to be
added to the end of each name. Why am I not allowed to use the same name
again if the original option group was deleted? How do I change the names?
Thanks in advance for the help. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114564
digital signature disappears
I wrote soome real basic code to automatically sign using a users
digital signature. When you click a button on the document, it asks
for initials, then asks you to select a certificate, then saves the
signed file to the desktop.
This works well with most users, but I have a user that keeps dropping
the signature from the document when they e-mail it. Are there any
known compatiblilty issues between 2007 and 2003?
The code was written for Word 2003, but the user has Word 2007. The
sig is there before he e-mails it.
Thoughts? Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114552
My first GLOBAL TEMPLATE
I have created my first global template, allowing me to remove about 400
autotext entries from each user's normal.dot and moving these into a group
template named "groupautotext.dot". The "groupautotext.dot" has now been
copied into a MSWORD startup folder. Tested this on a few secretary pc's
last night, all looked good......until this morning, Friday the 13th, MSWORD
is crashing all over the place for these pc's. Each secretary that I've done
this for cannot complete a document before the dreaded crash.
My questions:
1)I created a folder "MSWORDstartup" off of the "C" drive, copied
"groupautotext.dot" into this folder, changed the startup location to point
to the path "C:\MSWORDstartup". Could it be because I have changed the
default startup location??
2)This is the first time I've worked with global templates, is this behavior
to be expected??
I had to take the global template out of the startup to allow the
secretaries to continue to work. I really don't want to give up on the
"global" template idea, it really would work for what I am trying to
accomplish, although with the behavior that I am seeing with this, the global
at this point, could not work for me.
Diane Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114550
Locating cursor in text files in VB
How to get any required location in a text file in VB,to print certain contents
in specified location?
i=Loc(#1) gives the current location but while i do
seek #1,i
print #1,"Some data at specified location"
this print is getting printed in the text file at some position but not at
the place
where LOC is pointing. how to achieve this?
Im saving the text file as *.html to genearte html page in the end. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114544
curser location
How to write Text Data to File at Specified at location. i tried with Loc and
Seek..But dont work properly. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114542
Copy/Paste
Hi Everyone,
I was wondering if it is possible for me to use VBA somehow to import
some data from an excel file.
i.e. Open up excel file and copy some data from particular sheets then
paste into word file on particular pages.
I tried to put some macros in excel VBA but it seems that excel VBA
does not recognize .doc file to begin with.
I have a really big excel file report and every month I have to copy &
paste each section in excel worksheet to word document to create a
hard report and as you can tell it is pain in the axx.
Can anyone help?
Thank you ! Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114534
detecting bullet style?
Can anybody give some advice how to detect which one of bullet style is
applied to list. I know how to detect difference between bullets and
numbered styled list, but i want to differ is it roman style or for example
is it circle or square?
Ivo
thanks a lot for any help. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114527
Distribute Doc?
I have a DOT file, with extensive Userforms. I need to distribute this file
via email to a large number of people who will fill in the forms, generate a
print-out, save the file with their responses and email it back. I don't
really understand the relationship between the DOT and DOC files. Any help
you can give me or resources you could provide that would help me, I
sincerely appreciate.
Thank you,
SoCal Rick Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114522
Macro to increment field by one- suggestions?
Greetings,
I'm working on a large document (with many section breaks), and I would like
to have a field in the footer which is "Revision Number". I don't want to
use Word's RevNum field because that increments each time a user saves the
document. (I don't want to increment the field just because I'm fixing a
typo.)
This isn't supposed to be an iron-clad system, but I just want a way that,
after I've made significant changes to my document, I can click a toolbar
macro, increment the value by one, and have a message box tell me "Revision
Number increased to XYZ". Ideally, I could also keep the field editable, so
I could just type in "001" whenever I wanted to start the numbering over (for
whatever reason).
Any ideas or resources? It's been a long time since I programmed VBA from
scratch. Thanks! Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114517
Drop Down List help
I have created a drop down list that has 6 options. I want to create a
second list based on their answer in the first list
example:
list 1: a,b,c,d,e,f
if a is picked in drop down 1 then drop down 2 will display
1,2,3,4,5,6,7,8,9,10
If b is picked then drop down 1 will display 11,12,13,14,15,16,
etc etc Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114509
Error check for cursor position
Is there any code to make the following work:
Private Sub RadBtnTMS1_Click()
'if
'cursor is placed in an empty line within a cell then
ActiveDocument.TrackRevisions = True
'else
Exit Sub
End Sub
I want that, upon the selection of a radio button, the program enables track
changes IF and ONLY IF the cursor is placed in a line with no text.
Thank you,
Juan Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114502
Customize Toolbar with Macros in Current Template
I am making a template for distribution to a team. I want to make some
macros accessible via a customized toolbar I am making for my
template. But the macros in the template aren't available in the list
of macros in the Toolbar Customization dialog box. It looks like only
macros from other global templates are available.
Is there any way to do what I want to do? Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114498
Drop Down List - "Other" Option
Hello, I have a form with a drop down box. The last option in the
drop down box is "Other". If someone selects that, I would like to
force them to type in what the "other" thing is. Is there a way to do
that?
Thanks a million,
Shell Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114496
Appending new pages when filling out form
I have a one page form that I need some help with. The form is used to track
daily account summaries and has space enough for two accounts. The problem is
there may be more than two accounts for that day. What I want to avoid is
having to open a new instance of the template for each two accounts.
Is there a way to insert new pages with the form layout as needed within the
same document? Like maybe a custom toolbar with an insert page button (how
would you do that?) or something? And while I'm thinking about it, if the
answer is a custom toolbar, can they be document specific? That is, would I
see the toolbar if I was working on some other document?
Thanks very much for any help Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114495
Need a check before printing
Hi All,
I'm new to VBA. Need to solve the following problem: when a user
prints a document I need to check whether the "Print on both sides"
option is chosen, else pop-up a message to chose that option.
Thanks in advance
Regards
-ArunDhaJ Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114489
Silently Mark Tables and Cells
I want to mark some cells with a tag that isn't displayed to the user.
Something like the ID attribute in an HTML tag.
However, when I try to use Selection.Range.Cells(1).ID = "something", the ID
doesn't persist between document sessions. That is, when I close and reopen
the document, even with a save, it is no longer set. This is evidenced with
another macro which has the following code:
MsgBox (Selection.Range.Cells(1).ID)
Any help with this is greatly appreciated. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114486
Word macro - pause
How do I get a macro to pause and wait for keyboard input and then to resume? Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114478
Modules in DOT not being transferred to DOC when saved
We have a Document template with a module containing some very old
code. (Basically,it unprotects the document and spell checks inside of
some cells).
Unlike all previous versions or Word, when the user saved the
document, this module was transferred the the newly created Doc file.
Under 2007, it's not. The entire model is omitted.
Is this a security option I can change or do I have to change the code? Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114475
Vertical Alignment = Top on page 2
When creating a MS WORD template, is there anyway in the page setup to
indicate CENTER vertical alignment only for page 1, anything beyond page 1
should have TOP vertical alignment. The option of "JUSTIFY" allows for too
much spacing between text and images. Is it possible to do a statement like
this in the footer of the document, {IF{PAGE}>1"verticalalignment=top"}}
Diane Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114472
Word 2007 macro IncludeText
I have @400 individual Word files that I need to combine into a single Word
file. All the files live in one directory. I'm currently using an AutoOpen
macro to loop thru each of the individual files and 'include' the text using
"Selection.InsertFile".
This works ok but is very slow. Is there a better way to combine lots of
Word documents into a sigle word Document? Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114468
line breaks
how do i keep a date or name together at the end of a line in the body of a
letter? In WordPerfect it is just Control Space. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114457
Line and page number
Hi,
How do i find the line and page number using a macro?
--
Rich...
http://www.jadwizracing.co.uk Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114448
Moving cursor
I'm just starting to learn VBA and am having problems moving the cursor. I
have the following code:
Private Sub txtInterviewDate_AfterUpdate()
If txtInterviewDate.Value < txtGBStartDate Then
MsgBox "The InterviewDate must be greater then or equal to the
GBStartDate"
txtInterviewDate.Value = Null
End If
End Sub
This does work fine but the cursor moves to the next textbox and I want it
to be in txtInterviewDate textbox so the date can be re-entered. It's
probably really simple but the different things I tried don't work. Thanks
for the help. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114447
Insert graph with macro
Hi,
Im looking to use a macro to insert a graph into word, the data is in a
file which looks something like this 25,26,15,8 and so on.
How do I do this?
--
Rich...
http://www.jadwizracing.co.uk Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114446
hiding tables
I have a form upon where I need to hide form fields and text if another field
is populated.
I have done this with paragraphs and works great, however in this form the
fields and text are inside tables so the paragraph does not work.
ie:
ID: <CLID>
In paragraph to hide both I code
With ActiveDocument
ActiveDocument.Unprotect
.FormFields("CLID").Range.Paragraphs(1).Range.Font.Hidden = True
ActiveDocument.Protect wdAllowOnlyFormFields, NoReset
in this new form where I use this it will only hide the formfield.
How can I hide a whole table?
Thanks,
Bryan Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114443
Lost Bookmarks when mail merging
Hi there
I have the following code that creates a mail merge final document and names
it then allows the user to edit the remaining document. This all works fine
but I have added dookmarks to the template to use for selection of text but
these bookmarks are missing. Where have I gone wrong with my code?
Sub LC1()
'
' LETTER Macro
' Macro created 07/11/2006 by Graham Dingley
'
Application.WindowState = wdWindowStateMinimize
Dim MMMDoc As Document
' This part creates a new document based on the open template
Set MMMDoc = Documents.Open("c:\customers\nelsons\cravefamily.dot")
'***************************************
ActiveDocument.MailMerge.OpenDataSource Name:="C:\WPDOCS\LC1.DOC", _
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:="", SQLStatement:="",
SQLStatement1 _
:=""
ActiveDocument.MailMerge.ViewMailMergeFieldCodes = False
With MMMDoc.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
MMMDoc.Close SaveChanges:=wdDoNotSaveChanges
Set MMMDoc = Nothing
Selection.HomeKey Unit:=wdStory
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="CasePath"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
' This part goes to the start of the document and sets up a Bookmark
called CasePath using the field CASEPATH from Lawmaster
CasePath = ActiveDocument.Bookmarks("CasePath").Range.Text
ChangeFileOpenDirectory CasePath
ActiveDocument.SaveAs FileName:="Family Crave - " & Format(Now(),
"dd-mm-yyyy hh-mm-ss") & ".doc", FileFormat:=wdFormatDocument,
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="",
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False,
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
' After saving the document the bookmark is removed then document is
resaved, the cursor is sent to the end of the document and Word is maximised
to allow the user to carry on typing
Selection.HomeKey Unit:=wdStory
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
CommandBars("Mail Merge").Visible = False
ActiveDocument.Save
Selection.EndKey Unit:=wdStory
Application.WindowState = wdWindowStateMaximize
Selection.EndKey Unit:=wdStory
Selection.MoveUp Unit:=wdLine, Count:=2, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
CommandBars("Mail Merge").Visible = False
ActiveDocument.Save
Application.WindowState = wdWindowStateMaximize
Selection.HomeKey Unit:=wdStory
End Sub
Thanks in advance for any help. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114437
Send Word Data to Excel
Someone sent me a document today, where I can double-click on a section, like
a name, address, a telephone number, etc., and the entire section becomes
active available for inputting text. So you can double-click, add your
names, a few other strings of text, and even click on little boxes which show
check â??xâ?? marks when clicked. I am wondering what kind of formatting this
is. Also, I am wondering if there is a way to use VBA to take all of these
inputs from a user, and click a button to export each â??rangeâ?? to Excel. Iâ??ve
done programming in Excel, and used DocVariables in Word, to send information
from excel to Word. It worked quite well in fact. I have never taken
variables from Word, and exported then to Excel though. Iâ??m pretty sure if
you can go one way, you can go the other way too.
Iâ??ve read the info. here:
http://www.word.mvps.org/FAQs/InterDev/ControlXLFromWord.htm
This site is great, but I donâ??t think this is going to give me the answer
that I am after. Is there another resource oin the web that describes how to
get data from Word to Excel?
Finally, the document seems to be protected. Most of the controls are
disabled in the Word document. Where can I go to enables all the standard
Word features?
Regards,
Ryan---
--
RyGuy Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114431
Tab key problem in a protected document containing a VB control
Steps to reproduce the problem:
1) Create a document with protected and non-protected sections
2) Create a table in a non-protected section.
3) Protect the document. Note that the tab key advances the cursor to the
next cell in the table, as expected.
4) Unprotect the document and turn on design mode.
5) Add any Visual Basic control anywhere in the document.
6) Turn off design mode and protect the document again. Now try to press tab
in the table - it will jump to the next unprotected section (or back to the
top). Even if you remove the VB control, the tab behavior is still affected.
I tried overriding the tab key behavior by creating a macro named NextCell,
but I found that once you add the VB control it no longer calls this function
- it's doing something else. I couldn't find anything on Microsoft's support
site about this issue, and couldn't find a solution via google searching
either.
This problem is very annoying as I could benefit from being able to use VB
controls in a protected document. But if the users can't navigate the table
as usual (especially tabbing past the end to create new rows), I have to find
workarounds using macros and toolbar buttons.
I am using Word 2000, so maybe the problem was fixed in a later version. I'm
rather doubtful, but please let me know if it works in your version so at
least I know I can use VB controls in the future (if we ever get around to
upgrading). Any suggestions for workarounds are also appreciated.
Thanks,
Elbyron Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114429
Selection.Find.Execute FindText:=OrigDocID, ReplaceWith:=NewVersio
I'm using this line of code to find a specific section of text (OrigDocID) in
a document and replace it with different text (NewVersion).
Previously lines are:
Selection.HomeKey
Selection.MoveRight unit:=wdSentence, Extend:=wdExtend
The FindText is completely ignored, as if the data wasn't found. Both
OrigDocID and NewVersion are of the format: "9999999v99".
Any questions or ideas?
Thanks,
Wes Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114426
How to erase (or insert) numbered paragraph if applicable only
Word 2003. Legal documentation.
I have a contract w/paragraph numbering (1. xxx) followed by paragraph in
bodytext. I want the user to delete the numbered paragraph and following
bodytext paragraphs (or insert, whichever is easiest) if the paragraph is not
(or is) applicable to them. Obviously without loosing formatting nor the
sequence in paragraph numbering (b/c of cross-referencing later in the
document). I thought of adding the text in a command and have it
erased/inserted via a bookmark when the user clicks on the "Yes/No" of a
msbgox. But, I would like all this to be kind of cross-referenced. If the
user clicks "Yes", text shows; if the user clicks "No", text disappear. If
the user comes back to the msgbox and reclicks "Yes", then the text would
reappear. Paragraph are relatively small. I tried with bookmark but did not
get the results I had hoped.
Hope I am making sense. Thx. Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114425
Formatting with InsertFile
I'm trying to combine two word documents into a single file using the
InsertFile method and it seems to be working pretty well, except for
the formatting in the final document.
The individual word docs that need to be combined are styled using a
template that keeps some text on top in a single column while
formatting the rest of the doc in two columms. The problem I'm seeing
is that everthing below the first document's (DocA) header text is
getting styled in two columns - including the header of the second
document which should be in a single column.
Here's my code:
'Loop through all the files in the temp dir and copy them to one file
Dim oFinalDoc As Word.Document = oWord.Documents.Add()
Dim oFinalSelection As Selection = oWord.Selection()
For Each oFile As FileInfo In oDir.GetFiles("*.doc")
oFinalSelection.InsertFile(oFile.FullName)
oFinalSelection.InsertBreak(Word.WdBreakType.wdPageBreak)
Next
oFinalDoc.SaveAs("C:\Windows\Temp\1234\FinalDoc.doc")
Would appreciate any help in figuring out how to retain the formatting
in the final doc exactly as it is in the individual docs.
Thanks,
Fauzia Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114421
Automate the "File/Send/As Attachment" as an embedded link in Word
I need to send out a word document that I will need to have my sales reps
fill out. I would like to add a link at the bottom of that word document that
when clicked will automatically send that word document with the changes made
to me as an attachment in an email. Basically what I'm asking... is there a
way to automate the "file/send/as attachment" feature with a button embedded
in the word doc? Word 2003
--
Thank you,
Kari Tag: ALL LATEST DOWNLOAD AND UPDATE OF WINDOWS VISTA....... Tag: 114420
FREE DOWNLOADS FOR VISTA SUPPORTING SOFTWARES
ONLY ON
http://polticsinfs.blogspot.com/