Supprressing Warning message from Macro
I have written a macro in Word VBA using Word 2002. This
macro opens an excel spreadsheet then copies some graphs
into a Word document. However, because the excel file
contains macros, the Word macro halt execution due to a
warning message that the file contains macros and ask if I
want to continue. I would like to suppress this warning
message from within the Word macro such that the macro
will continue to run.
Any and all help would be greatly appreciated Tag: VBA Forum Tag: 64929
I don't want reviewing available every time I open a document. Ho.
This is getting extremely frustrating to have changes that have been accepted
or rejected keep popping up. We do a lot of electronic submissions to
clients, and we don't want them to see these changes. I really wish Microsoft
would stop guessing what we users really want -- it's usually the wrong guess! Tag: VBA Forum Tag: 64928
split document by pages
Hi,
I need to split a Word 2003 doc in multiple docs with a predefined
number of pages (eg, 10 pages). Therefore, all the docs created will
have 10 pages (except the last maybe).
One way is move through the pages of the original doc (starting from
the beginning, iteratively until de end) creating docs and copying
each block of 10 pages read.
Any hint (with sample code)?
TIA,
ram Tag: VBA Forum Tag: 64926
Embedded Button in Word Document
Good afternoon!
As the sun sinks slowly into the west, one last question before the weekend.
Is it possible to create a button which is embedded directly into a
document, which can be attached to VBA code.
I know you can do this in Excel, I just can't find the command button tool
anywhere in Word.
Thanks in advance & have a good weekend!
Pete Tag: VBA Forum Tag: 64924
Making a macro pause for a few seconds
Can anyone tell me how to accomplish this, please?
Excel has a WAIT function, but Word doesn't seem to recognize it.
Thanks
Pete Tag: VBA Forum Tag: 64902
Digitally signing macros
Hi!
I've created a couple of macros that I'd like to digitally sign. I just want
to issue a certificate myself and use that so the security level can remain
at "High". I've used selfcert.exe to create a certificate but when I sign
the macro and save my template I get an error: "There was a problem with the
digital certificate. The VBA project could not be signed. The signature will
be discarded." How can I solve this??
Thanks in advance.
Morten Tag: VBA Forum Tag: 64898
serial port communications
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C525BF.24031450
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am looking for a way to do serial port communications directly from =
excel. I have been experimenting with mscomm.dll. It seems to have =
problems getting data from the serial port sending is no problem. Is =
there a better solution than mscomm?
--=20
K.Brown
/************************************************************************=
*****
To the optimist, the glass is half full.=20
To the pessimist, the glass is half empty.=20
To the engineer, the glass is twice as big as it needs to be.=20
*************************************************************************=
*****/
------=_NextPart_000_0008_01C525BF.24031450
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.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I am looking for a way to do serial =
port=20
communications directly from excel. I have been experimenting with =
mscomm.dll.=20
It seems to have problems getting data from the serial port sending is =
no=20
problem. Is there a better solution than mscomm?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><BR>--=20
<BR>K.Brown<BR>/*********************************************************=
********************<BR> =20
To the optimist, the glass is half full. <BR> To the pessimist, =
the glass=20
is half empty. <BR> To the engineer, the glass is twice as big as =
it needs=20
to be.=20
<BR>*********************************************************************=
*********/</FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C525BF.24031450-- Tag: VBA Forum Tag: 64872
Creating a macro to open a dialog box.
Using MS Word 2003
I would like to create a macro that opens a dialog box that prompts the user
to accept or deny certain terms.
The best example I can use is a EULA. Either you agree to the terms and the
document opens, or you disagree and document does not open.
Trying to figure this out alone is quite difficult, and any assistance
offered will be greatly appreciated.
Can anyone help me with this issue? Tag: VBA Forum Tag: 64870
Possible to Read/Write Word Docs without Word Application?
hi!
Is it possible to Manipulate (Read/Write) MS Word documents without
installing Microsoft Word. i.e if i dont have MS Word installed on my
machine and i want to add some lines of text into Word document
programatically. How is it possible?
Thanks
Ahmad Jalil Qarshi Tag: VBA Forum Tag: 64869
How to create a button with menu in Word Toolbar
A button on the Word Toolbar, with a dropdown menu on the right side.
Just like the Underline button on word toolbar, shown in the following
picture.
http://lidelu.w4.900host.com/temp/dropdown.gif
How can I create this kind of button in my VBA program? Tag: VBA Forum Tag: 64864
Find PaleBlue and Replace with Yellow in all Tables
I have a Word 2003 document with a number of tables that have certain cells
with a pale blue background. I wish to change the background colour of these
cells to Yellow. I thought I could do it with find and replace, but have had
no success.
I'm wondering if someone could help with a macro to achieve this.
Mark Tag: VBA Forum Tag: 64860
Update only certain fields in template
I have a template that has several document variables and text fields in it.
There are 2 userforms that allow a user to update the document by dropping
the text into the fields and updating them. One of the userforms works
great, it updates and all is fine. The other one however clears all text in
text fields when it updates. The code is the same for both userforms with
the exception of the variable names, so I don't understand why they act
differently. Perhaps it would be better if I could be more specific in
telling Word what I want to update.
Question: is there a way to specify only certain fields be updated?
Thanks in advance
SRD Tag: VBA Forum Tag: 64853
Retrieve data from LDAP
I'm trying to retrieve a user's name, phone, fax, and e-mail address from an
LDAP server and pre-fill textboxes in a Word userform based on the user who
logs in.
Does anyone know of some code or reference they can point me to? I'm
currently using Excel for the database after following the information on the
Word MVP site "Retrieving Data from a Named Range in Excel using DAO" but
would prefer not to have to maintain a second list of data.
Any help would be greatly appreciated.
Thanks.
PBC Tag: VBA Forum Tag: 64852
office 2000 error message while trying to install
I have a copy of msoffice2000 that I'm trying to install on a new computer.
the installation dosen't get very far when it gives error1305 missing file
F:\PFiles\MSOffice\Office\Bitmaps\Dbwiz\INVENTRY.GIF. I can't just skip
this file and continue installing. I can only retry or cancel the install
altogether. How do I go about getting this file so I can install it?
--
Message posted via http://www.officekb.com Tag: VBA Forum Tag: 64851
Any way to open an encoded text database in Word that won't conve.
I'm trying to retreive a database (MDB file) in Word and have been unable to
convert the file. I have tried all the encoded text file troubleshooting
steps, short of running the Office set-up program again. Any other
suggestions? I need to get a large mailing out...
Note: I am using Office XP Small Business Tag: VBA Forum Tag: 64850
writing wizards...
what products/tools are needed to write an original wizard to generate a word
document?... just wondering where to start.... Tag: VBA Forum Tag: 64843
Emailing single Worksheet
Hello from Steved
I got the below by going through Google.
The objective is to email a single Worksheet.
I'm getting a error
Invalid procedure call or argument.
Please help Thankyou.
Sub eMailActiveWorksheet()
Dim OL As Object ' Outlook instantiation
Dim EmailItem As Object ' A new mail item (e-mail)
Dim FileName As String ' The name of the file we are
attaching
Dim lngLoop As Long ' counter for the FileName length
Dim TempChar As String ' used for the loop to test for
unusable characters
Dim SaveName As String ' Attachment's new name, after
cleaning
Application.ScreenUpdating = False ' speed up Excel
processing time
Set OL = CreateObject("Outlook.Application") ' New
Outlook application
Set EmailItem = OL.CreateItem(olMailItem) ' new
MailItem
FileName = ActiveSheet.Name & "1-City" &
ActiveWorkbook.Name ' create a filename on the fly
For lngLoop = 1 To Len(1 - City) ' error check for
unusable chars in the filename
TempChar = Mid(1 - City, y, 1)
Select Case TempChar
Case Is = "/", "\", "*", "?", """", "<", ">", "/"
Case Else
SaveName = SaveName & TempChar
End Select
Next lngLoop
ActiveSheet.Cells.Copy ' copy the contents of the
ActiveSheet
Workbooks.Add ' create a new workbook
Selection.PasteSpecial Paste:=xlValues ' paste the
worksheet values into the new book
Selection.PasteSpecial Paste:=xlFormats ' and their
formats
ActiveWorkbook.SaveAs "C:\Temp" & SaveName ' temp file
attachment location
ActiveWorkbook.ChangeFileAccess xlReadOnly ' make
access read only
With EmailItem ' with the newly created e-mail
.Subject = ActiveWorkbook.Name
.Body = "This is an example of a single worksheet
sent by VBa mail"
.To = "1-Depot"
.Importance = olImportanceNormal 'Or
olImportanceHigh Or olImportanceLow
.Attachments.Add "C:\Temp" & SaveName
.Send ' send the worksheet
End With
Kill "C:\Temp" & SaveName ' delete the temporary
attachment
ActiveWorkbook.Close False ' close down the workbook
without saving (single sheet)
Application.ScreenUpdating = True ' always remember to
switch it back on!!
Set OL = Nothing ' clean down memory
Set EmailItem = Nothing
End Sub Tag: VBA Forum Tag: 64841
col in status bar
Is there a way to access the Col value in the status bar with VBA?
I want to be able to replace the indents and tabs with spaces so I can
create a txt file maintaining the layout of the document.
I am using a monospaced font throughout the document and have to append
several word, wordperfect and amicus format documents to create 1 large
document. Tag: VBA Forum Tag: 64840
Run-time error '4608'
Hi,
I am frustrated. I keep getting the error Run-time error '4608' Valule
out of Range.
Here are the details. This error only occurs in a specific Word 2003
document. It happens when I click either one of two buttons on my toolbar
that are linked to a macro that sends the document to either the upper or
lower printer tray. Here is the VBA code for the macro:
Option Explicit
------------------------------------------
Sub UpperTray()
Dim OriginalFirstPageSetting As Long
Dim OriginalOtherPagesSetting As Long
Dim FirstPageTray As Long
Dim OtherPagesTray As Long
Dim wdPrinterMiddleBin As Long
With ActiveDocument.PageSetup
OriginalFirstPageSetting = .FirstPageTray
OriginalOtherPagesSetting = .OtherPagesTray
.FirstPageTray = wdPrinterMiddleBin
.OtherPagesTray = wdPrinterMiddleBin
ActiveDocument.PrintOut
.FirstPageTray = OriginalFirstPageSetting
.OtherPagesTray = OriginalOtherPagesSetting
End With
End Sub
---------------------------------------------------
Sub LowerTray()
Dim OriginalFirstPageSetting As Long
Dim OriginalOtherPagesSetting As Long
Dim FirstPageTray As Long
Dim OtherPagesTray As Long
With ActiveDocument.PageSetup
OriginalFirstPageSetting = .FirstPageTray
OriginalOtherPagesSetting = .OtherPagesTray
.FirstPageTray = wdPrinterLowerBin
.OtherPagesTray = wdPrinterLowerBin
ActiveDocument.PrintOut
.FirstPageTray = OriginalFirstPageSetting
.OtherPagesTray = OriginalOtherPagesSetting
End With
End Sub
Can anyone help?
Thanks. Tag: VBA Forum Tag: 64839
"protect document" is disabled...
i am creating a MS Word 2000 form .dot. I want to "protect document > forms"
so that people can tab through and answer question. The document was
actually two documents that I put together and are kind of in different
formats. My "protect document" selection is Greyed-out... What does this
mean? Tag: VBA Forum Tag: 64838
disabling spell checker
I'm developing a spell checker for our local language using VC++. it is to be
implemented as an Add-in for Word. So how do i disable the english spell
checker progmatically using my code? Also will it be possible for the add-in
to work with all versions of word??????? Tag: VBA Forum Tag: 64834
Adding font name
Hi All
I have the following code which types "ABCD..." in each font type that you
have on your PC. I want to also add each font name to the generated document
next to each the corresponding line of text in that font, e.g.
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 123456789 - Arial
Sub listfonts()
Documents.Add
For Each thisfont In FontNames
With Selection
.InsertAfter "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
123456789" & vbCr
.MoveUp unit:=wdParagraph, Count:=1
.MoveDown unit:=wdParagraph, Count:=1, Extend:=wdExtend
.Font.Name = thisfont
.Font.Size = 10
.MoveDown unit:=wdParagraph, Count:=2
End With
Next
End Sub
Any help would be appreciated. Thanks Tag: VBA Forum Tag: 64833
Running template code after a 3rd party app runs
We have a 3rd party app that uses Word as its report writer. I would like to
run additional code from within the template after the app is done and has
filled-in all bookmarks. If I put my code in an AutoNew procedure in the
template, it executes before the other app is done. I can force it to run
later by putting a delay in the AutoNew and calling the code from another sub
(Application.OnTime Now + TimeValue("00:00:05"), "NewProcedure", but I can't
always be sure how long the 3rd party app will require. Is there a way other
than a time value to control starting the code when the other app is
complete? Thanks very much! Tag: VBA Forum Tag: 64831
Specail Numbering using Field Codes
I need to autonumber several cells in a table.
I'm sure I can use field codes to help customize this:
the number should look like this "EAP.01.001"
EAP. - first three letters are subjective (I'll type those in)
01. - second set of numbers need to reflect the number of the Numbered
Heading 001 - third set is just autonumber with an additional 0 in front.
I have surfed the discussion group for an answer and I have gleemed pieces
and parts but since I don't totally understand field code jargon, I can't
seem to make sense of it.
I appreciate your help!
--
Thank you,
scrowley@littleonline.com Tag: VBA Forum Tag: 64827
How to determine when Word has completed printing?
I am using VB6 to control Word to create and print a document. After
printing I am quitting Word, but itr seems Word is still printing. How can I
pause or wait until word is completed printing?
Thanks in advance,
WayneM Tag: VBA Forum Tag: 64825
Creating a Word Doc from an Access Record
Hi all,
I need to create a document from an Access record. I don't think I can use a
report because there are so many variables. If certain things are checked it
will be in the document if it isn't i need the document to shift so there
won't be any white space.
The problem is I may print [InsuredName] on one line and then at column 130
on the same line I need to print the [CompanyName]. I tried tabbing after
[InsuredName] but that won't work bc some letters are wider than others.
There is no way to know how many Tabs I'll need after [InsuredName] to
get to column 130.
I tried using objWord.selection.Information(wdFirstCharacterColumnNumber)
but Access didn't recognize the constant wdFirstCharacterColumnNumber.
Any help would be very much appreciated!
TIA
Ted Tag: VBA Forum Tag: 64824
VBA equivalent of a cell margin's "Same as Whole Table" check
All the help documentation says is if, say, the .LeftPadding property is set,
it overrides the tables .LeftPadding property. I need to do the opposite:
make the cells follow the default table.LeftPadding property.
Word seems not to have anything like
Selection.Tables(1).Cell(1, 1).LeftPadding ="Back to the Deftaul"
Thanks for your help! Tag: VBA Forum Tag: 64820
how do I read contact names from Outlook address book?
I need to populate a listbox in Word with every forename and surname in the
Outlook Address Book (global address list). This is so that authors can use
the template and select their name form the listbox.
I'm using Word 2003 and Outlook 2002, but this may vary.
--
Thanks in advance,
Stephenc Tag: VBA Forum Tag: 64818
View Markup in Template Offspring - How to turn it off?
I have searched hi and low and read several threads and articles about Word's
newest "feature" (the one that will finally cause me to say FrameMaker is
better, BTW). I understand how to turn off markup in my document but I cannot
seem to turn it off when someone creates a document based on a template I've
created. Here's what I do to the template to make sure it's "clean":
-View Markup.
-Accept all changes.
-Change view from Final showing markup to Final.
-Turn off Reviewing toolbar.
-Save template.
I also have the following option cleared in Tools>Option, Security tab: Make
hidden markup visible...
I did this to over 30 templates yesterday. Today I created a new document
based on one of those templates, and that d#$& markup appeared. I don't want
View Markup to automatically come on every time someone creates a new
document based on one of my templates. What do I need to do in the template
to ensure that this doesn't happen?
This is the absolute worst feature I've ever had to deal with in word. Bad,
bad, bad, bad. finished whining now. :->
Please help.
Sheila Tag: VBA Forum Tag: 64816
Toolbar button for all users
Hi!
I'm sure this has been asked a million times before:
How du you add a button to the Word standard toolbar (pointing to a macro)
and make that available to all users on a terminal server? I've tried saving
the document containing the toolbar as a .dot file and put that in
C:\Program Files\Microsoft Office\OFFICE11\STARTUP but the toolbar isn't
modified:-(
Thanks in advance
Morten Tag: VBA Forum Tag: 64812
How do I read the content from a given listbox?
I have a two-column listbox, populated with paths in column 1 and filenames
in column 2. How do I get the text from just column 2?
--
Stephenc Tag: VBA Forum Tag: 64805
Set FileSave dialog to be 'cancel'
Hi.
me again
how can I tell word when I quit the word.application object to not come up
with a
dialog
wrd.quit SaveChanges:= cancel ?
somehow wrong
Gina Tag: VBA Forum Tag: 64802
Insert chart into Word
I posted this in the Excel programming NG, but to no avail...thought I'd try
it here.
I would like to have a macro (I'm actually writing it in Excel) that would
take the active chart and paste it into an open Word document at the current
location of the cursor. Unfortunately, I'm much more familiar w/ the Excel
object model than the Word object mode. I have the following code, but can't
quite figure out what object(s) need to go where the XXXX is. Oh, and I'm
more concerned about getting this to work rather than what's better
(imagefile, metafile, etc). Thanks in advance!
Sub PortToWord()
Dim WrdDoc As Word.Document
Set WrdDoc = Word.ActiveDocument
ActiveChart.Copy
WrdDoc.Range.PasteSpecial DataType:=wdPasteEnhancedMetafile,
DisplayAsIcon:=False
End Sub Tag: VBA Forum Tag: 64796
check box won't uncheck
I've got some checkboxes on a user form that check/uncheck and
enable/unenable depending on each other's values.
Trouble is, in the following code the .chkAndByPost.Value won't change to
false even though the conditions are met for it to do so and the following
line of code (.chkAndByPost.Enabled = False) runs correctly.
Can anyone tell my why my code won't change .chkAndByPost.Value to False in
the following code? Many many thanks for any feedback...
Sub tickIsToFax()
With objForm
.txtToFaxNumber.Enabled = .chkIsToFax.Value
If .chkIsToFax.Value = True Then
.chkAndByPost.Enabled = True
.txtToFaxNumber.BackColor = RGB(256, 256, 256) 'white
.txtToFaxNumber.SetFocus
Else
Select Case .chkIsToEmail.Value
Case True
.chkAndByPost.Enabled = True
Case False
' Even though this code runs,
' the value won't change to False
.chkAndByPost.Value = False
.chkAndByPost.Enabled = False
End Select
.txtToFaxNumber.BackColor = RGB(192, 192, 192) 'grey
End If
End With
End Sub Tag: VBA Forum Tag: 64795
multi access form
I have been asked to create a form that asks the users to fill out the
details and thats that....ONLY ITS NOT....they want it so the next time
they open the completed form they are able to add another answer to the
same question under the previous answer..
How is this done..so it knows there is already an answer there but it
needs to place another reply underneath....bearing in mind there is
several questions in a kind of table format.
Thanks in advance,
Mat Tag: VBA Forum Tag: 64783
Open properties box on close
Hi,
I'm in no way a programmer but I have a programming type query.
Is it possible to force Word to open the Document Properties box either on
saving the said document or closing the document using macros or vba or
something?
Thanks in advance
MC
--
Mark Cann
ICT Adviser Tag: VBA Forum Tag: 64774
Stripey Tables
Good morning, all!
Following on from the success of my checkerboard table yesterday (thanks to
all who helped!), I now want to do something that I thought would be simpler,
but in fact has turned out to be more problematical.
I now want to colour alternate columns in the table in one of two different
colours, to produce a striped effect.
However, when I get to the indicated line in the code below, I get "Object
doesn't support this property or method" I'm sure this should be quite easy
to get around - I would have thought that each member of a column would be a
cell, but I'm obviously wrong - can anybody help me out with the correct
syntax, please?
Thanks in advance
Pete
Sub VStripeGrid()
SetRGBColours ' Subroutine to set RGB sequences to colour variable names
GridReset ' Subroutine to sets all cells back to white
FirstForegroundColour = Black
FirstBackgroundColour = Custom1
FirstTexture = wdTextureNone
SecondForegroundColour = Black
SecondBackgroundColour = Custom2
SecondTexture = wdTextureNone
'Set ThisTable = ActiveDocument.Tables(1)
If Not Selection.Information(wdWithInTable) Then
MsgBox ("Select a table before running this macro")
Exit Sub
End If
Set ThisTable = Selection.Tables(1)
ColumnCount = ThisTable.Columns.Count
RowCount = ThisTable.Rows.Count
'MsgBox (RowCount & " rows by " & ColumnCount & " columns")
SetRGBColours
For ColumnCounter = 1 To ColumnCount
If ColumnCounter Mod 2 = 1 Then 'odd numbered column
MsgBox ("Column " & ColumnCounter & " of " & ColumnCount)
----> For Each CellToColour In ThisTable.Columns(ColumnCounter)
With CellToColour.Shading
.ForegroundPatternColor = FirstForegroundColour
.BackgroundPatternColor = FirstBackgroundColour
.Texture = FirstTexture
End With
Next CellToColour
End If
If ColumnCounter Mod 2 = 0 Then 'even numbered column
For Each CellToColour In ThisTable.Columns(ColumnCounter)
With CellToColour.Shading
.ForegroundPatternColor = SecondForegroundColour
.BackgroundPatternColor = SecondBackgroundColour
.Texture = SecondTexture
End With
Next CellToColour
End If
Next ColumnCounter
End Sub
Sub SetRGBColours()
Black = RGB(0, 0, 0)
Blue = RGB(0, 0, 255)
Green = RGB(0, 255, 0)
Cyan = RGB(0, 255, 255)
Red = RGB(255, 0, 0)
Magenta = RGB(255, 0, 255)
Yellow = RGB(255, 255, 0)
White = RGB(255, 255, 255)
Custom1 = RGB(200, 150, 150)
Custom2 = RGB(100, 100, 100)
End Sub
Sub GridReset()
Set ThisTable = ActiveDocument.Tables(1)
ColumnCount = ThisTable.Columns.Count
RowCount = ThisTable.Rows.Count
MsgBox (RowCount & " rows by " & ColumnCount & " columns")
SetRGBColours
For RowCounter = 1 To RowCount
For ColumnCounter = 1 To ColumnCount
Application.StatusBar = "Processing Row: " & RowCounter & ",
Column " & ColumnCounter
'MsgBox ("Row " & RowCounter & ", Column " & ColumnCounter)
CellToColour = ThisTable.Cell(Row:=RowCounter,
Column:=ColumnCounter)
With CellToColour.Shading
.ForegroundPatternColor = Blue
.BackgroundPatternColor = White
.Texture = wdTextureNone
End With
Next ColumnCounter
Next RowCounter
End Sub Tag: VBA Forum Tag: 64771
Appearance of message box
Hello,
Does a message box always pop up at the top of the screen? Is it possible to
position it between 2 open documents so that the message box only becomes
visible after the first document is closed. Is there some code for?
Alternative question : can I change to coordinates on the screen at which
the message box shows up?
Thanks Tag: VBA Forum Tag: 64769
Update Template Files - AddIns?
Hi All,
I'm after some advice about the best way to setup some templates and have
them update.
What I would like to do is be able to update a series of template files
after the user has chosen a header (company logo we have more than one) and a
footer (office addresses we have about 10).
The story so far is that I have created a single template using AutoText and
user forms and I can get the template to add headers and footers ok. change
them etc. But it will prompt the user to choose each time they open a
document based on the template.
What I would like to happen is that once user has chosen logo and office
address, is for the template document to be updated so that they are not
prompted again when they open a new document. (Template files to be down
loaded to users PC's)
The thing is that there will be at least 6 or 7 template files and I would
prefer that the choice for headers and footers is only done once and that
they will update all templates regardless of which template they choose first.
I've read some posts and looked on the net for info on AddIns but not really
sure if this is the way to go, or how to set these up.
I know that this a long post and thanks for reading this far.
Any advice welcome
--
TIA
Mark Tag: VBA Forum Tag: 64768
Help me out with bullet styles
Hi to all.
Am a new member.
I am working on a macro for Changing the bullet styles in my document
from bullet 3 to bullet style 1 whenever i come across bullet style 3.
Do anyone of you know how to do it.
Vijay Tag: VBA Forum Tag: 64766
How to create a button with menu in Word Toolbar
A button on the Word Toolbar, with a dropdown menu on the right side.
Just like the Underline button on word toolbar, shown in the following
picture.
http://lidelu.w4.900host.com/temp/dropdown.gif
How can I create this kind of button in my VBA program? Tag: VBA Forum Tag: 64762
Functionality for setting Default Signer in Word, Excel
Hi guys,
I am using Office 2003 and enjoying the feature of digitally signing word
and excel
documents. I need to know whether there is some setting to set the default
signer ? At the moment when ever I sign, I get this window to select the
signer certificate. In Outlook Express and Outlook 2000 there is a feature
to set signer certificate but this seems to lacking in other office
application like Word, Excel and Power Point. Is there some way to configure
this using registry settings of office not to ask for signer certificate and
use an already set certificate. If not is there any VBA function to set this
?
Thanks for reading,
Wahaj
--
Visit our new website at:
www.ascertia.com Tag: VBA Forum Tag: 64760
Pages....
My goal is to add a 'Page x of y' string in my footer. Stickler is I am
creating the whole doc in code. I have not seen a way to insert a fieldcode
programmatically. Can this be done? or is there a better way? Tag: VBA Forum Tag: 64758
Launch URL from VBA
Can anyone point me to code that will let me launch an URL in the
user's default browser from VBA?
thanks,
gary Tag: VBA Forum Tag: 64753
Creating, Populating and Linking combo boxes Word 2K
I am attempting to design a customized word 2000 document that does several
things:
1. Upon opening, it populates several demographic fields (like patient
name, address etc.) from a health care Practice Management Software database.
The PMS company has provided a "generic document" with a bunch of fields
embedded in the document that are linked by VBA code to their database. The
idea is that you can create a custom form (say a prescription blank) by
modifying the generic document, deleting the fields you don't want on the
form and adding text, graphics and controls as desired. The new customized
form is then initialized in the PMS and the document is opened by the PMS
referencing a patient. Upon opening an auto open macro initiates VBA code
which populates the fields with data on the patient in question. All of this
works fine to this point.
2. I also want to place some VBA controls (specifically, drop down lists
and combo boxes) in the document. I can place a combo box on the document
from the Controls Toolbar but I can't figure out how to populate the list
with choices.
3. I want to create "primary" combo boxes with lists of categories and I
want
to link those controls to "secondary" controls such that the choice made in
the primary combo box determines the choices that populate the secondary
combo box. I understand that populating the secondary combo boxes would
need to be done with VBA code.
I am somewhat familiar with using VBA in Access and I think I could probably
do steps 2 and 3 above in Access. However, the controls don't seem to work
the same in Word.
Finally, I've been trying to find a basic/introductory VBA reference for
Word 2000
without any success. There are plenty for Access and Excel but I haven't
found any that cover Word VBA applications.
Can anyone point me in the right direction on my project, and does anyone
have any recommendations for published or online resources for using VBA with
Word?
Thanks Tag: VBA Forum Tag: 64749
Insert Footer Page x of y via Access to Word Template
A user will enter/select data from an Access form. Then
VBA takes the users responses and inserts them into the
Word document. So far that is working fine.
My problem lies with the footers. There are 3 sections to
this document. I have been able to set the footers for
sections 1 and 2 via VBA code.
Section 3 needs to read something like this:
left side - INFORMATION PULLED FROM ACCESS FORM
center - Page x of y (total pages within section 3)
right side - current date
How do I pull the total number of pages within the section?
Thank you in advance.
Cindy Tag: VBA Forum Tag: 64747
Microsoft Word Forms fed by Access
I am using Word forms that are populated from Access. In 2002, I do not get
a dialog. In 2003, I get a dialog informing me I am running a query. When
selecting "Yes" to allow the query to run, I then get the data source dialog.
If I do not select another source, the data does get populated from Access.
Is there any way of not displaying these dialogs ? Tag: VBA Forum Tag: 64744
Word not really closed ?
Hi.
I send some records from access to bookmarks in word
herefore I use
_________________________________________
Set WD = CreateObject("Word.Document")
template = CurrentProject.Path & "\Invoice.dot"
Set DC = Word.Documents.Add(template)
_________________________________________
all works fine .as long as I do only close the actual document in the
upcoming word where my invoice shows up and not the whole word application.
when I close the whole application the next time around when I want to open
word I get an error in the following line
_______________________________________
--> Set DC = Word.Documents.Add(template)
_______________________________________
I get a (Runtime Error: 462) message telling that the
'remote-server-computer doesn't exist or isn't available'
I can press 'Stop' or 'Finish' or 'Debug' (sorry, translated from a German
Version)
If I press 'Debug' the above line --> is highlighted
If I press 'Stop' and use my tool to access word again it works fine.
I have a sub which is called each time after records are sent to word
containing
__________________________________________
Set DC = GetObject(Word.ActiveDocument)
Set DC = Nothing
Set WD = Nothing
__________________________________________
I have checked the task manager and I can see that word is somehow present
as a task that second time but I get this error message
Please anyone an idea of what this could be??
Gina Tag: VBA Forum Tag: 64739
Insert AutoText in Bookmark
Hi,
I'm trying to insert an AutoText into a bookmark but retain the bookmark.
I've looked at previous posts and can see how to do text but can't work out
how to do it for AutoText.
The basic code for text that I'm trying to amend is
Dim bmRange As Range
Set bmRange = ActiveDocument.Bookmarks("myBookmark").Range
bmRange.Text = "Inserted Text"
ActiveDocument.Bookmarks.Add _
Name:="myBookmark", _
Range:=bmRange
I assume that what i need to do is somehow set "bmRange.Text" to the AutoText
when i've tried this i get the name of the AutoText as text instead of the
actual AutoText. I aslo would like to use a graphic AutoText.
--
TIA
Mark Tag: VBA Forum Tag: 64735