InsertFile

J

JayM

I currently have a macro which inserts a selected file from a directory.

Sub GeneralUsertextClauses()
With Dialogs(wdDialogInsertFile)
.name = varUSERTEXT
.Show
End With
End Sub

How can I ensure that the selected file isn't an attachment when used with
Outlook?

JayM
 
J

JayM

Just needed to add this is a macro that I use in Word as well. So needs to
work as well in both.

Thanks

JayM
 
G

Graham Mayor

Aside from the fact that varUSERTEXT is an undefined variable, what is the
relevance of Outlook here? The macro simply displays the InsertFile dialog
(or rather it would if varUSERTEXT actually referred to something).

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

JayM

Sorry for not providing the full information

varusertext is referenced as follows:
Global Const varUSERTEXT As String = "w:\zzword97\usertext\"

The relevance of Outlook is that these files could be inserted into word
documents (for letters) or into emails if you are sending a email to a Client.

The files could be standard paragraphs or addresses etc

JayM
 
G

Graham Mayor

You are missing the point. If you are programming Outlook, then you should
be asking your questions in an Outlook forum. They will want to know what
version of Outlook and if prior to version 2007 whether you are using Word
as e-mail editor or Outlook's own editor.

With Word you might find Autotext or Autocorrect more convenient tools for
inserting standard paragraphs - and surely your addresses would be inserted
from Outlook Contacts?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top