Copy multiple paragraphs from multiple documents into one document
I need to copy addresses from 1000 documents and put them into one document.
I need a macro that will copy from all documents under one Folder and Paste
them into another document, preferably a Table. I can work with the
formatting later. I located a "How to Find & ReplaceAll on a batch of
documents in the same folder", but I am not good enough to modify it to
Select the correct area and Copy and Paste instead. Tag: Are there smart tags available for chemical names? Tag: 74272
Opening File Dialog throws odd memory error
Hi all,
I have a line of VBA code that displays a file open dialog using the
Application.FileDialog(msoFileDialogOpen) object.
However, sometimes when I execute the .Show method I get a message box
saying "There is not enough memory or disk spec to complete the
operation".
I don't believe it really a hardware related issue as I'm not shot of
either RAM or HD space, but more curiously if I change the object to be
of type msoFileDialogPicker then it will display the dialog.
In fact the problem seems to be interchangeable between the two file
dialog types, i.e. they will both cause the problem at some point.
So does anyone know either
a) what might cause the problem in the first place?
b) something I could do in my code prior to calling Show to sort out
the memory?
I can't catch the error either to dynamically switch object types
because it seems to be raised by Word and not the VBA runtime.
TIA
Craig Tag: Are there smart tags available for chemical names? Tag: 74271
How to (Task Pane)
Is it possible to create task pane in word 2003 without using smart
document? Bcoz I dont need any xml or xsd files.
Please help. Tag: Are there smart tags available for chemical names? Tag: 74264
DsoFramer ActiveX Control Problem
I am having a problem with the BeforeDocumentSaved event for the DsoFramer:
http://support.microsoft.com/default.aspx?scid=kb;en-us;311765
Here is the sig:
BeforeDocumentSaved(ByVal Document As Object, ByVal Location As String,
Cancel As Boolean)
I *can* get the save to be cancelled in VB6: e.g.
Private Sub oFramer_BeforeDocumentSaved(ByVal Document As Object, ByVal
Location As String, Cancel As Boolean)
MsgBox "not going to save :p"
Cancel = True
End Sub
But I *can't* get this to cancel in VBScript or JScript...
JScript:
<script language="JScript" for="oframe" event="BeforeDocumentSaved(Document,
Location, Cancel)">
BeforeDocumentSaved(Document, Location, Cancel)
</script>
function BeforeDocumentSaved(Document, Location, Cancel){
alert("will still save :(");
Cancel=true;
}
VBScript:
Sub oframe_BeforeDocumentSaved(Document, Location, Cancel)
MsgBox "saving"
Cancel = True
End Sub
Can someone offer some ideas on how to get this to cancel the save. My
thoughts are that somehow this is passing the Cancel parameter by value
rather than reference.
Thanks,
Owen. Tag: Are there smart tags available for chemical names? Tag: 74263
This one's tough: Finding Character Styles from VBA
I need to determine whether character styles are in use for any sub-portion
of a Range.
If you've worked with Range properties, you know that MOST properties (e.g.
.Bold) return a special undefined value (such as 9999999) when the property
value is not uniform over the range. However, Word uses the Range.Style
property for BOTH Paragraph Styles and Character Styles. If you query the
.Style property for a Range which is ENTIRELY in one Character Style, the
value will be the name of the Character Style. The moment that the Range
overlaps by a single character, into a run with either another Character
Style or no Character Style, then the return value will be the name of the
Paragraph Style for the Range. (If the Range overlaps two paragraphs with
different Styles, then Range.Style will be Nothing)
One solution is to check every single character in the range. That's
effective, but extremely slow. Word-by-word checks would be faster, but not
100% reliable.
A second solution is to examine all of the character styles in defined for
the document (I'm really only interested in the ones which Word has created
on its own from Paragraph styles, such as "Heading 1 Char"), map out
everywhere they are in use in the document (including Footnotes, etc.), and
then see whether any of those ranges overlap the areas of the document that
are of interest to me. That is faster than solution 1, but requires 1-200
lines of VBA code, and is still a kludge.
Does anyone have a direct and elegant way of accomplishing this?
A direct cc: to me, in addition to a reply-to-group, would be appreciated.
--
Fletcher James
President
Levit & James, Inc.
(703)771-1549
MailTo:fjames@levitjames.com
http://www.levitjames.com Tag: Are there smart tags available for chemical names? Tag: 74258
Macro inconsistently refuses to let me size columns
I have a macro that builds a table, populates it, and sizes the columns.
Sometimes, expecially when I am debugging, the system throws an error that
says that I can't access table columns because the table contains cells of
different sizes. Then, other times the system sizes the columns correctly.
This is driving me crazy!
--
Nancy Tag: Are there smart tags available for chemical names? Tag: 74256
I want to create macros within custom toolbars
I would like to create macros with customized toolbars and THEN put them in a
drop down list available to users Tag: Are there smart tags available for chemical names? Tag: 74255
How do I prevent users from using the "Enter" button on my form?
I made a form for work, however when someone uses the "Enter" button, it
ruins the formatting of the form. Could someone illistrate to me how I can
disable the Enter button in my form when I protect it. Tag: Are there smart tags available for chemical names? Tag: 74254
Word automation questions (Using from VB6)
I'd like to create a new Ms Word document from my VB6 application using a
template.
I'am new using automation, so i have some questions.
1) I set a reference to my project "Microsoft Word 11.0 Object Library".
Is this backwards compatible with older versions of Microsoft Word ?
Is it possible to load it dynamic (depending on a users version of
Microsoft Word)
2) Is it possible to check if Microsoft Word is installed ?
3) Whats the best way to create an instance of Microsoft Word and create a
new document from my template ?
(Must work with and without an existing running instance of Microsoft
Word)
Dim wdApp As Word.Application
Dim docNew As Word.Document
Set wdApp = New Word.Application
Set docNew = wdApp.Documents Add(App.Path & "\report.dot")
-Or -
Dim wdApp As Word.Application
Dim docNew As Word.Document
Set wdApp = GetObject(, "Word.Application")
If wdApp Is Nothing Then
Set WordApp = CreateObject("Word.Application")
End If
Set docNew = wdApp.Documents.Add(App.Path & "\report.dot")
-Or
Better solution
Thanks in advance,
Robertico Tag: Are there smart tags available for chemical names? Tag: 74248
Can I launch MSO Document Imaging from a Word macro?
I need to be able to display a *.tif file programmatically from a Microsoft
Word Visual Basic macro. I'm running Microsoft Office Professional 2003 in
Windows XP. I've created a reference to the Microsoft Office Document
Imaging 11.0 Type Library and added the MODI Viewer control to my toolbox,
but when I try to add the control to a form or document I get a message
saying "Library not registered." What do I need to do to be able to use this
control, or even just to launch the *.tif file in Microsoft Office Document
Imaging from a Word macro? Tag: Are there smart tags available for chemical names? Tag: 74246
Smart Document Deployment Issue
I am using Code Signing certificate from Thawte for signing the Manifest.XML
and C# DLLs. If I deploy this pack on my development machine everything works
fine. But when I try to deploy it on QA machine I get a Security Warning
dialog stating "An error occurred while verifying signature. Do not trust
these credentials." and "Always trust macros from this publisher" checkbox is
disabled. If I use XMLSign tool to verify it on QA machine, the Security
Warning dialog displays as "Publisher authenticity verified by Thawte Code
Signing CA".
Can anybody please help me to resolve this issue?
Any help will be really appreciated,
Thanks is advance,
Milind Kadam Tag: Are there smart tags available for chemical names? Tag: 74245
Repeat Header problem
Hi
I encounter the following problem:
After inserting a table to the document I add the following lines:
obTable.Rows.HeadingFormat = True
obTable.Rows.AllowBreakAcrossPages = False
and the table heading is not repeated, however when I record this design to
a macro the come seems identical but that table does repeat the heading
Thank you,
Shmuel Shulman Tag: Are there smart tags available for chemical names? Tag: 74243
Save As Macro
Guys,
I am trying to create a Word 2002 macro that when ran it'll pop up the save
as box which will be a specific network folder.
Can anyone help.
Many Thanks
kevin Tag: Are there smart tags available for chemical names? Tag: 74236
macros that runs when move to another document of change focus
Is there a way to run a macro when you chnage focus to another word document?
ie. got two documents open and you switch between them without closing them?
MervB
:-) Tag: Are there smart tags available for chemical names? Tag: 74231
Smart Document Problem
We have developed a smart document program which adds document action
pane in word 2003. As we are suppose to delevering this to endusers
they do not see the XML tags as we are hidding it programmatically.
We want to show the action pane globally for a document I said
globally because the XML tags are not important to us we are storing
the changes made in active pane as a custom property of that document.
But now the problem is that I want to place the XML tag like one at
start of document and one is at end of document.
Please guide me, I am new to smart document SDK.
Am I going on the right track? Is it the proper way of using smart
document? and also we want to deploy this on only office 2003 machines.
Lots of thanks in advance. Tag: Are there smart tags available for chemical names? Tag: 74230
I need to attach a toolbar in a .doc so that it travels with the .
I have created the custom toolbar, but need to attach is so that when the
template is emailed the toolbar will appear - even if it's not previously set
up on their computer.
I have the template as a .doc as I understand it is not possible to attach
custom toolbars to .dot that will work in the way I wish
Does anyone know how to attach the toolbar?
Many thanks Tag: Are there smart tags available for chemical names? Tag: 74227
Insert text into certain position in word
Hello:
I want to export some data from Ms project and insert these text into
special position ( Line and column ) . But i don't know how to navigate in
word. i mean i have no idea about how to mark the position where i want to
add new text.
please give me some good ideas on how to do it.
Thanks for your attention ! Tag: Are there smart tags available for chemical names? Tag: 74223
Objects disconnected from clients
In Word 2000, I created a template with a toolbar button that runs a macro
that inserts 4 returns and an AutoText entry. The AutoText entry is a
"Verify No Defects" symbol that I drew in Word. It consists of a 4 grouped
objects: a circle, a diagonal line, the word "Defects", and a checkmark.
This AutoText inserts consistently without a problem when the toolbar button
is clicked.
However, I have another toolbar button that does exactly the same thing
except that the AutoText entry that it inserts has 5 grouped objects: the
same 4 described above and an additional check mark. This macro works fine
on some occasions but on others gives this Run-time error: '-2147417848
(80010108)' Automation error. The object invoked has disconnected from its
clients.
Can anyone explain this error message to me and tell me how to fix the
problem? I have come up with one solution but I don't like it. I copied
the grouped items and pasted them into Microsoft Picture. They then became
one "inline with text" object instead of a "floating" object and the macro
works fine. However, I really want the floating grouped object.
TIA,
Vivian Carroll Tag: Are there smart tags available for chemical names? Tag: 74220
Shapes OLEObject FileName change
How do you cnange the FileName of an existing shapes? Tag: Are there smart tags available for chemical names? Tag: 74219
EMail from Word2003
hi
i ask this as no one replied to my earlier query.
i want to send a word document as an attachment without using Outlook.
is there a .dll file that comes with WinXP or something (something high
level, not socket level :) ) that can be used to send email using VBA?
i'd rather not use a third party library/dll as i want to maximise the
chances of a user being able to send the email at one go.
thanx again
riyaz Tag: Are there smart tags available for chemical names? Tag: 74214
Print Mailmerge - Access Password Protected
Hi,
I use VB6 for mailmerge a Word2000 document connect with access2000 database.
My customer throw my program set a access database password.
I'd like to do a word's print from my program without change
doc's files.
I'd tried with this code....
x = WrdApp.Application.Documents.Open( myDocument )
!!!!!!! Here Word Ask me database's Password
With WrdApp.ActiveDocument.MailMerge
.DataSource.ConnectString = (IMPOSSIBLE Is ReadOnly)
.Destination = wdSendToPrinter
.Execute
End With
Can i solve this problem without change word's document ??
Sorry for my bad english !!!!!
Thank's
Daniele Pinai (Italy) Tag: Are there smart tags available for chemical names? Tag: 74212
Macro from WORD to FRONT PAGE
Hallo everybody.
I have a really big problem: I made many macro in WORD, EXCEL an ACCESS (I
made quite 100 macros, in OFFICE 2000). Now, to make my work simpler, I want
to prepare a web site with the links I need to work, and some commands in
the pages.
So: I need to prepare a button that, on click, run my macro. What can I do
to obtain this?
Please help me!!!
Guido Tag: Are there smart tags available for chemical names? Tag: 74210
Populating word 2002 forms with ODBC data
Is there a way to access ODBC databases easily from within Word 2002?
I have a template that starts with a user form, in that user form, the end
user is asked to enter a client number. I want to be able to retrieve the
client data based on that number.
The data is in Foxpro 6
Any direction here would be great as I'm not having much luck finding a "yes
you can/no you can't" type answer Tag: Are there smart tags available for chemical names? Tag: 74205
Need help with a looping macro
I need help with writing a "Do Until" macro. I am inserting a text file
(that changes daily) and need to insert spaces at fixed lengths in each line.
I want to start on the first line and stop the macro at the end of the file.
The macro is:
Sub Insert_Spaces()
'
' Insert_Spaces Macro
' Macro recorded 9/7/2005 by keenpar
'
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText Text:=" "
Selection.MoveRight Unit:=wdCharacter, Count:=7
Selection.TypeText Text:=" "
Selection.MoveRight Unit:=wdCharacter, Count:=16
Selection.TypeText Text:=" "
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine
End Sub
Any help will be most appreciated.
Thanks
--
Jerry Keenan Tag: Are there smart tags available for chemical names? Tag: 74202
EMail ing in word
hi
using Word2003.
read thru postings but didn't find what i'm looking for. :)
i've got a word document that needs to be sent as an email attachment.
i know how to access fields and all, but have not been able to find an
EMail object that allows me to send the word doc as an attachment to
the address(es) that is/are required
i'd rather use a library or object (such as ADO for data access,
without opening Access or Excel) but not use the Outlook application to
do it. typical setup is WinXP with Office2003
is this possible?
thanx and please help
riyaz Tag: Are there smart tags available for chemical names? Tag: 74201
How to trap ClosePreview, when user clicks the X inupper right corner.
I open a Word template from with in Outlook.
The template that has a Public Sub named ClosePreview,
I use this macro to close the Word application by calling Quit
wddonotsavechanges,
this works fine when user clicks the built-in Close button.
If user clicks the X in upper right side my macro will not execute.
Can some one please advise how to trap the event associated with clicking
the "X",
my goal is to close and quit Word with out saving any changes.
Thank you Tag: Are there smart tags available for chemical names? Tag: 74200
Text Box -- put IP at top
I have a text box on a user form which receives multiple lines of text (more
than a 'screenful' -- this particular text box can display only about 10
lines of text, and I have scroll bars visible).
When the user clicks inside the textbox, the insertion point is always on
the last line. The user has to scroll up to see the beginning of the text. I
want the cursor to start at the head of the text.
I have tried the CurX and CurLineX features, but cannot get them to work for
me. What else can I do?
Thanks,
Ed Tag: Are there smart tags available for chemical names? Tag: 74199
INCLUDEPICTURE prob
When I place the merge field within the INCLUDEPICTURE it appears ok as {
MERGEFIELD myfield}. However when I do a Save it instantly changes to the
actual data, i.e., "MyFileName.jpg". I have a routine in the document open
event that calls a routine in the dot file that reupdates all the fields.
However, it never updates the picture. I have a feeling that once it gets
changed in the Save as the actual data, it never changes again. What do I do
to cause the picture to change from record to record? Tag: Are there smart tags available for chemical names? Tag: 74191
merge doc opening message
When I open a document that is merged from Access, I get a message that begins:
Opening this document will run the following SQL command. Select * form
'queryname'.... Is there any way to prevent this message from appearing? Tag: Are there smart tags available for chemical names? Tag: 74190
Menus en Word
Tengo dos .dot a.dot y b.dot. El A.dot se encarga de administrar los
men=FAs, de tal manera que b o cualquier otro .dot pueda agregar
sub-men=FAs bajo el mismo men=FA de la barra de menues.
Cada vez que un .dot se levanta, en el AutoExec agrega los men=FAs que
le son particulares. Es decir que b.dot agrega sus men=FAs cuando se
carga mediante la macro AutoExec, llamando a una funci=F3n en a.dot
Es l=F3gico que cuando se descarga el complemento saque los men=FAs que
agreg=F3, para esto en la macro AutoExit de cada complemento se borran
los men=FAs que cada uno de ellos puso. Es decir que b.dot borra sus
men=FAs en la macro AutoExit, llamndo a una funci=F3n en a.dot
El problema que todo esto funciona maravillosamente cuando estoy
editando y corro las macros a mano mediante F5. Cuando quiero poner
todo esto en producci=F3n, copio los .dot al directorio STARTUP de Word.
Hecho esto y levantado el Word, no funciona. He puesto trazas, por lo
que se que se ejecuta, pero no logro borrar los menues.
Para pero de males, luego saco los .dot del directorio de STARTUP de
Word, o sea que no hay nadie que me pueda cargar los menues, pero sin
embargo aparecen.
Cualquier ayuda o sugerencia ser=E1 bien venida, no duden en preguntar
si hay algo que no entienden de la exposici=F3n
Suerte
Gustavo Tag: Are there smart tags available for chemical names? Tag: 74189
How to Copy-n-Paste into textbox
how do you copy text from Outlook and paste it into a textbox of a Word form
Seems like a simple operation.
Right-clicking does not bring up a context menu.
ALT - Edit - Paste pastes the text into the adjacent table cell.
Any thoughts? Tag: Are there smart tags available for chemical names? Tag: 74188
Transposing word doc into Excel doc
If I have a word doc that my employees need to fill out and then I need the
information they put in to be able to be transposed into an Excel doc, is
this possible and if so how do I do it?
Thanks, Tag: Are there smart tags available for chemical names? Tag: 74185
align 2 paragraph styles with no line break (appear as 1 line)
I need to have 2 styles look as follows:
(style 1) 62340 Description line (style 2)
The number would be bold, the description line would not. Description line
can be very long, wrapping quite a few times.
Is there an option to have no line break and choose to align 2nd paragraph
with 1st?
I have used Ventura for years but have been asked to try & setup in MS Word,
which I don't think is going to work. Tag: Are there smart tags available for chemical names? Tag: 74181
The list openend document
On the right site when opening word than have you a list from the opening
files what you haven don. When you opend the file than is the next time not
the first one. The old program (word 2000) that was oke. The ask is that
chance that when i for de second time opend the file that also in word2000
the second one is.
----------------
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=0d0f81f0-5560-4db6-81e9-2fc3bbab7040&dg=microsoft.public.word.vba.general Tag: Are there smart tags available for chemical names? Tag: 74180
Unicode question
I seem to have a strange unicode problem. Let me descibe what I am doing:
Part of my VBA tool involves reading from a unicode saved text file which is
in the format:
findwordSPLITreplaceword
The VBA code then processes the sequence of lines and keeps replacing
"findword" with "replaceword". The sample text file is attached and its
contents are:
?SPLIT&agr;
?SPLIT&bgr;
?SPLIT&khgr;
Whenever I try to get the "findword" using a command like:
SPL=split(EachLine,"SPLIT")
msgbox strconv(SPL(0),vbfromunicode) ' Shows me gibberish for alpha and
gamma BUT works for beta!
The problems happen only for some unicode symbol fonts and work for all
other normal fonts and most symbol fonts.
My question is, if I need to have a file that may contain unicode characters
and is saved in unicode format and I need to be able to do find and replaces
the way mentioned above, what would be the best method? I have no idea why
this doesn't work for alpha and gamma and works for many others!
Thanks for your thoughts on this.
Vince
begin 666 test2.txt
M__ZQ`U,`4 !,`$D`5 `F`&$`9P!R`#L`#0`*`+(#4P!0`$P`20!4`"8`8@!G
E`'(`.P`-``H`QP-3`% `3 !)`%0`)@!K`&@`9P!R`#L`#0`*````
`
end Tag: Are there smart tags available for chemical names? Tag: 74179
Running two instances of Word at the same time
Can this be done? I've got some VBA scripts to run on about 800+ MIF files,
and I want to run the simple ones in one instance, and the complex one in
another instance (it has to be babied). Tag: Are there smart tags available for chemical names? Tag: 74178
saving autotext to normal.dot
I have a large autotext list with addresses etc. This has been saved to
an alternated file named normal2.dot. Now when I add a new auto text or
change an existing one it does not save it except in the current
session of word. next time it is turned on it will be gone.
It says normal.dot is read only but when I look at properties it says
it isn't. It doesn't appear to be saving to the alternate file either.
Also, the auto text doesn't appear automatically (although it used to).
Everytime the machine is rebooted I have to go to templates and add-ins
and select the extra file. Is there a way of making this a default.
A
Any ideas please
Thank you Tag: Are there smart tags available for chemical names? Tag: 74175
Greetings, problems with setting a bookmarked textbox value...it's protected?
Hi all,
I've been writing code in various environments, in varying
application, for a wide range of customers, for about 35 years now and
I'm still learning new stuff. ;) This week I'm helping a friend
create a Word document template (Word 97) that stores a bunch of
answers to questions in the registry (Using SaveSetting and
GetSetting). In this document, as a part of the startup processing
(AutoNew), I want to load the stored values back into the bookmarked
places where they belong. The problem is I'm getting a error saying
the location is protected. From what I understand of this, yes it is!
I've protected the document so the body cannot be modified...but I
want to be able to enter text/values into those places where I've
defined fields (such as Textboxes, Checkboxes...et al)
Here's the code I have so far, the error comes from this line:
BkMrkRng.Text = RegVal
<code>
Option Explicit
Private BkMrk As Bookmark, BkMrkRng As Range
Sub AutoNew()
Dim sBMName As String, S1 As String, S2 As String, RegVal As String
For Each BkMrk In ActiveDocument.Bookmarks
sBMName = BkMrk.Name
S1 = Mid(sBMName, 1, Len(sBMName) - 1)
S2 = Mid(sBMName, Len(sBMName))
RegVal = GetSetting("MBD", S1, S2, vbNullString)
If RegVal <> vbNullString Then
Set BkMrkRng = ActiveDocument.Bookmarks(sBMName).Range
BkMrkRng.Text = RegVal
ActiveDocument.Bookmarks.Add sBMName, BkMrkRng
End If
Next BkMrk
End Sub
</code>
Hints: I've used the bookmark name, split into 2 strings, to name the
Section and Key for the SaveSetting function so I can easily retrieve
the values. I've learned that by setting the text value of a bookmark
it clears the bookmark itself, therefore making it necessary to Add
the bookmark back in after setting the text value.
Thanks for any help,
Shell (Yes, this is my real name) Tag: Are there smart tags available for chemical names? Tag: 74166
=?Utf-8?Q?File=2C_Setup_=E2=80=93_Margins=2C_Paper=2C_La?=
I prefer to work keyboard-driven as opposed to mouse-driven. In Word 2003,
under File, Setup, the subheadings Margins, Paper, and Layout do not have
alt+key strokes, so I have to take my hands off the keyboard to use the mouse
to select them. Please fix.
----------------
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=8cef4bda-d47d-4572-92fe-f9201b4425cb&dg=microsoft.public.word.vba.general Tag: Are there smart tags available for chemical names? Tag: 74163
Using Access as Data Source
I am creating a Word template with a userform. The form features a combo box
populated with 175 manufacturers (using .AddItem). When a manufacturer is
selected, I would like text boxes elsewhere in the userform (for Contact
Name, Address, Phone) to update with the chosen manufacturer's information.
This gives the user a chance to verify this information before clicking OK
and feeding it into various areas of the document.
Rather than writing 175 Select Case statements to populate the text boxes,
I'm thinking that since I already have the contact info in an Access db
called CompanyInfo in a table called Contacts, I could somehow use this table
to feed the text boxes. My problem is I don't know the code needed to call
the table and have it populate the text boxes. How do I do this? Thanks! Tag: Are there smart tags available for chemical names? Tag: 74160
how to create a table from info from several documents
I have 1000 Word 97 documents. I want to "get" the name and address
information from them (all located in same positions in docs) and create a
TABLE to use for Mail Merge in the future. HELP. I also have Word 2003
and and received an email from a MVP with a Global macro (Finda & ReplaceAll)
but need more help on modifying it to work with this. I am NOT very good
with using macros. Tag: Are there smart tags available for chemical names? Tag: 74159
Customize Task Pane in Word 2003, or alike toolbar
Hi MS people,
At our firm we have about 10 templates that I want to display when word
starts up in the taskpane to the right, instead of the normal one,
either customize the old one or maybe make a new one ( dont know how,
there does not seem to be a easy way to add files/dirs so the user can
easily click and open the templates )
How the question is, are there a way to customize the Task Pane, add
direct links to files, or do I have to make one myself, and how?
The best link describing a little of the same problem I have is this
one, but its not that I'm looking for.... but close...
http://www.mcse.ms/message481718.html
best regards
Mikael Syska Tag: Are there smart tags available for chemical names? Tag: 74158
Macro not listed in OnExit dropdown box; why?
Hello there. After creating the same macro (titled "SelectCheckbox") in both
Normal.dot and in my template document titled "Expenses.dot", I then created
a checkbox field. When I clicked the checkbox's OnExit dropdown box and
scrolled down to find SelectCheckbox macro, it wasn't there. I even tried to
look at one of the NewMacros, but it wasn't there either. SelectCheckbox is
not a Public Sub by the way. Can anyone tell me why the SelectCheckbox macro
wasn't listed under the OnExit dropdown box?
Also, I find it exasperating that the width of OnExit dropdown box is so
narrow that a long macro name is truncated. What gives with that?
Thanks! Tag: Are there smart tags available for chemical names? Tag: 74153
display a pdf file while in Word
I am trying to add a command button that will display a .pdf file while I am
in Word.
I would also like to be able to use a command button to start a Flash
application. Tag: Are there smart tags available for chemical names? Tag: 74152
Obtaining full name in VBA
How can I obtain the first and last name of the logged in user from
within VBA. I know that Environ("Username") will give the username,
but there is no such entry for the users full name.
Thanks,
~ d Tag: Are there smart tags available for chemical names? Tag: 74150
AutoText and Image question (Report for Database)
Let me explain what i'am doing.
I'd like to use Microsoft Word as a report generator for my database.
(I created a VB6 application that creates and has access to a Microsoft
Access database )
One of my fields contains links to photos (full path). I want to print/save
every record on a new page.
(One photo (with some text) per page in one single document)
I created a Ms Word template with bookmarks (within cells) for my fields and
has access from my VB application to this document.
I create a new page for every new record from my database and use AutoText
to create new Bookmarks.
First question:
If Ms Word is already active, the AutoText fails (Error numer 5825, The
object is removed (translated from Dutch))
What can/must i do to prevent this ? (This error only occurs when Ms Word is
already active)
Second question:
Is it possible to define the photo size in my template. (I has to resize the
original photo to approximately 13 x 17 cm)
When the original photo is 2272x1704 everything goes well. The photo fills
the cell. (about 13x17 cm)
But when the original photo is 800x600, it doesn't fill the cell)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Some code i'am using:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dim WordObj As Word.Application
Dim WordDoc As Word.Document
Dim WordRange As Word.Range
Set WordObj = CreateObject("Word.Application")
Set WordDoc = WordObj.Documents.Add(App.Path & "\report.dot")
WordObj.Visible = False
' The code below will place the text/photo in the bookmarked location
'DESCRIPTION
Set WordRange = WordDoc.GoTo(What:=wdGoToBookmark, Name:="description")
WordRange.InsertAfter rs!description
'PHOTO
Set WordRange = WordDoc.GoTo(What:=wdGoToBookmark, Name:="photo")
WordRange.InlineShapes.AddPicture Filename:=rs!filename,
LinkToFile:=False, SaveWithDocument:=True
' The code below will go to end of page, create a pagebreak and insert
the AutoText
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
WordDoc.AttachedTemplate.AutoTextEntries("MyAutoText").Insert
Where:=Selection.Range, RichText:=True
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Thanks in advance,
Robertico Tag: Are there smart tags available for chemical names? Tag: 74142
AutoText and Image question (Report for Database)
Let me explain what i'am doing.
I'd like to use Microsoft Word as a report generator for my database.
(I created a VB6 application that creates and has access to a Microsoft
Access database )
One of my fields contains links to photos (full path). I want to print/save
every record on a new page.
(One photo (with some text) per page in one single document)
I created a Ms Word template with bookmarks (within cells) for my fields and
has access from my VB application to this document.
I create a new page for every new record from my database and use AutoText
to create new Bookmarks.
First question:
If Ms Word is already active, the AutoText fails (Error numer 5825, The
object is removed (translated from Dutch))
What can/must i do to prevent this ? (This error only occurs when Ms Word is
already active)
Second question:
Is it possible to define the photo size in my template. (I has to resize the
original photo to approximately 13 x 17 cm)
When the original photo is 2272x1704 everything goes well. The photo fills
the cell. (about 13x17 cm)
But when the original photo is 800x600, it doesn't fill the cell)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Some code i'am using:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dim WordObj As Word.Application
Dim WordDoc As Word.Document
Dim WordRange As Word.Range
Set WordObj = CreateObject("Word.Application")
Set WordDoc = WordObj.Documents.Add(App.Path & "\report.dot")
WordObj.Visible = False
' The code below will place the text/photo in the bookmarked location
'DESCRIPTION
Set WordRange = WordDoc.GoTo(What:=wdGoToBookmark, Name:="description")
WordRange.InsertAfter rs!description
'PHOTO
Set WordRange = WordDoc.GoTo(What:=wdGoToBookmark, Name:="photo")
WordRange.InlineShapes.AddPicture Filename:=rs!filename,
LinkToFile:=False, SaveWithDocument:=True
' The code below will go to end of page, create a pagebreak and insert
the AutoText
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
WordDoc.AttachedTemplate.AutoTextEntries("MyAutoText").Insert
Where:=Selection.Range, RichText:=True
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Thanks in advance,
Robertico Tag: Are there smart tags available for chemical names? Tag: 74141
Macro on Folder and Subfolders
Hi,
with the help of another post I am trying to combine two macros into
one to execute the macro on a folder of .doc files.
Here is my code that has a bug:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 22/09/2005 by Warringah Council for folder macro on
Position Descriptions
With Application.FileSearch
.NewSearch
.LookIn = "C:\Documents and Settings\gilleg\Desktop\testPDF\"
.SearchSubFolders = True
.FileName = "*.doc"
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
With Selection.Find
.Text = _
"<http://intra.warringah.nsw.gov.au/pdf/oh&s/GM
Ohsrprocedures201 OHSR Respon.pdf>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = _
"http://intra.warringah.nsw.gov.au/pdf/oh&s/GM
Ohsrprocedures201 OHSR Respon.pdf"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Paste
Next i
End If
End With
End Sub
Thanks. Tag: Are there smart tags available for chemical names? Tag: 74133
Unlinking a document from the template
Hi Group
Once again I'm trying to let people use my templates not only at work,
but at home as well. To make things complicated, they shouldn't need to
take the template with them. So, I need to get things out of the
template and into the document.
Three problems arise:
1) There can't be autotext in a document (right?), so I'll have to
unlink the autotext entries from the template and insert them directly
into the document.
2) Macros, Toolbars, Menus: I'll have to copy them to the document in
Document_new.
3) Styles are automatically copied by word and only updated from the
template on request. So, for once, Word is working with me.
So, my questions are: Is this all right? Isn't there an easy way of
doing all this? And: how can I do 2) right? E.g. I can't see any means
of enumerating all macros (and forms, and toolbars, etc.) in a certain
document.
Thanks for any input!
cheers,
Bernhard Tag: Are there smart tags available for chemical names? Tag: 74130
How do I get around the differences between common English and the rules used
for complex chemical nomenclature?