Insert File

I currently have a macro(written for MS Word) which inserts a selected file 
from a directory.

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

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

How can I ensure that the selected file isn't an attachment when used with
Outlook but is just inserted into the body of the text (word is my editor)?

JayM
0
Utf
3/30/2010 9:26:01 AM
outlook.program_vba 490 articles. 0 followers. Follow

2 Replies
1109 Views

Similar Articles

[PageSpeed] 30

You can't. You'd need to be using the Outlook object model and adding an 
attachment using Outlook code.

-- 
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"JayM" <JayM@discussions.microsoft.com> wrote in message 
news:09F02102-575E-45E9-BD2D-5B2AA754ABB0@microsoft.com...
>I currently have a macro(written for MS Word) which inserts a selected file
> from a directory.
>
> Sub GeneralUsertextClauses()
> With Dialogs(wdDialogInsertFile)
> .name = varUSERTEXT
> .Show
> End With
> End Sub
>
> varusertext is referenced as follows:
> Global Const varUSERTEXT As String = "w:\zzword97\usertext\"
>
> How can I ensure that the selected file isn't an attachment when used with
> Outlook but is just inserted into the body of the text (word is my 
> editor)?
>
> JayM 

0
Ken
3/30/2010 1:01:29 PM
OK Thanks for looking

"Ken Slovak - [MVP - Outlook]" wrote:

> You can't. You'd need to be using the Outlook object model and adding an 
> attachment using Outlook code.
> 
> -- 
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
> 
> 
> "JayM" <JayM@discussions.microsoft.com> wrote in message 
> news:09F02102-575E-45E9-BD2D-5B2AA754ABB0@microsoft.com...
> >I currently have a macro(written for MS Word) which inserts a selected file
> > from a directory.
> >
> > Sub GeneralUsertextClauses()
> > With Dialogs(wdDialogInsertFile)
> > .name = varUSERTEXT
> > .Show
> > End With
> > End Sub
> >
> > varusertext is referenced as follows:
> > Global Const varUSERTEXT As String = "w:\zzword97\usertext\"
> >
> > How can I ensure that the selected file isn't an attachment when used with
> > Outlook but is just inserted into the body of the text (word is my 
> > editor)?
> >
> > JayM 
> 
> .
> 
0
Utf
3/31/2010 8:03:01 AM
Reply:

Similar Artilces:

How do I import system file details such as filename and date etc.
Hello all, Is there a way to import system file information, such as filename, modified date, etc, into an Excel spreadsheet or Access database? I have nearly 4,000 photographs I'm attempting to sort and catagorise, and it would be very usefull to be able to gather this information into a spreadsheet. I know it can be done with Access, but how? Thanks all, Cheers! Rooksie, Try this piece of code on a blank worksheet: Sub get_file_details() Dim fs, f, f1, f2 Range("A1").Select ActiveCell.Offset(0, 0).Value = "File name" ActiveCell.Offset(0, 1)....

VBA Import of text file & Array parsing of that data
Using XL 2993 & 97 The array formula which parses the information below (from a text file) by "trimming" elements of the "Directory" line of information is: Workbooks.OpenText Filename:="C:\Test\Listing.txt", _ Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth, _ FieldInfo:= Array(Array(0, 1), Array(10, 1), Array(17,1), _ Array(21, 1), Array(39, 1)) Specifically: "Directory of C:\BOB AMY Estates\Bank Documents" is being parsed: (because of data columns following it) 11/21/2004|of C:\|BOB|AMY Estates\Bank|Documents 0 | 10...

How do this happen? 2 Personal FIles!
Hi, All of a sudden, I have 2 Personal Folders!!!! They seem identical, and I cannot get rid of one or the other. * The only thing recently changed is the installation of XP SP-2. * All previous XP-Pro updates have been installed * Running Outlook 2000, and all updates are installed (never had any problems with these...they were installed "long ago." Thank you for your help! "Howie" Post your mail support mode of Outlook 2000. Line 2 of Help | About if you don't know. -- Russ Valentine [MVP-Outlook] "stuff" <Howie@*S*P*A*M*AetosCentric.COM...

Can I link Word files to an Access table?
We're going to use Access for reporting purposes, and one of the things we need to do as part of that reporting is to maintain management approvals (always in a Notes or Word file). Is it possible to add Notes or Word attachments into an Access table record (with the understanding that each record will have to have several of these approvals)? If not, is there a way to link files to a particular record?Many thanks for whatever advice you can offer....

Invalid path name in restoring a file in 2005
My sister has installed Money 2005 on a new computer from her original cd. She made a backup on a cd from her old computer. We have tried every suggestion I found in this newsgroup or on the website,but whenever we try to restore this file on the new computer she gets the message of invalid path name. I downloaded Money 2006 to see if I could duplicate the error and could not. Perhaps this is because it is not 2005. Since she is in Georgia and I am in Kentucky, I can't see her computer. She does not go on the Internet so I can't ask her to upgrade her version. Does anyone have a...

Problem converting Publisher files to pdf
Hair tearing problem! I have an A4 page of text with a footer with page number and line above. If I try and create a pdf file either using Adobe Acrobat or Adobe Distiller or even going through a process of saving as a Postscript file and then converting to pdf via Adobe I get the footer with page number and line jump up about half an inch and attach itself to the bottom of the text. I felt this might be something to do with incorrect page sizes but can find nothing wrong here. Does anyone know what this might be? Adrian 'Haven't heard of this problem before. ?? Here's...

How do you open multiple files in specifc order?
In Excel 2000, I was able to open about 10 files in a specific order by clicking on the last file, holding Ctrl, and clicking on the files in reverse order in order for them to open in order. So the first file I clicked on opened first and so forth and the last file I clicked on was active on my screen. Once I downloaded 2003, this is no longer the case. Just wondering if this is even a possibility. ...

How to see Excel files as separately on taskbar?
When I open more than one Excel file, it used to display them as separate icons on my task bar. But for some reason, now I only get one one icon, and I have to go to Windows on the Menu Bar to switch between them. I can't use Alt/Tab anymore. It only affects Excel. Go to the Tools menu, choose Options, then the View tab. There, check the "Windows in Taskbar" setting. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Annette" <Annette@discussions.microsoft.com> wrote in message news:2519A212-2035-42C...

Takes forever to open files! Your advice, please...?
Hi there, I'm running a pretty speedy system (p4 2.4ghz, 512 megs of RAM), and most stuff runs pretty quickly, including all Office apps... EXCEPT Excel. Often times, it takes up to a full minute after clicking on an Excel or CSV file for Excel to open and load it. Other times, Excel files load instantaneously. Any idea what could be the matter here? Thanks in advance for your suggestions (either e-mailed -- see address in sig below -- or posted here). Regards, Adam -- http://www.bladam.com/ You may write me at usenet-asz at the domain bladam.com to bypass my spam filter. Tha...

Can't load old .PST files
I have Microsoft Outlook 2000 and have saved my .PST files before reformating. After installing Outlook 2000, I tried to get all my mail/calendar/contacts back by using the .PST files I had saved but it doesn't work. I have a file named outlook.pst and one caled archive.pst. How can I use them? If trying to 'read' frm a cd you cannot OL requires read/write access. Copy frm cd to hd, ensure read only flag is off, then in OL File/Open/Personal Folders.... browse to location David "Louise" <pou@videotron.ca> wrote in message news:064201c36b45$9136f7c0$a101280a@p...

Why does Word 2007 hyperlink to Acrobat 5 PDF open [Embedded File.
1. What I want to do: For classes, I create study outlines in Word 2007, inserting hyperlinks to readings that I have saved on my notebook as Adobe Acrobat 5 PDFs. I do that because I sometimes need to refer to the readings quickly, as in class or during my reviews for exams. As I read, I sometimes highlight passages, insert bookmarks, or make notes. When I am finished reading, I want to be able to save those changes to the original linked PDF. 2. What actually happens: When I click on the hyperlink I have inserted in my outline, the target PDF opens in Adobe Acrobat 5,...

write data in .txt file
I am recieving data from remote server.And around 40 number of market it is receving.And i need only few of them i am trying to store that market like "EURUSD",USDJPY","GBPUSD" in a txt file. Whenever it comes to this market it will write data in that txt file. Can you help me to write little code. this is event code: m_MainEdit=m_MainEdit + "<Price Change>" + SessionId +RequestId + a ; m_MainEdit=m_MainEdit + Market +Bid + b + Ask + High ; if(Market="EURUSD") { // code for this function // create file EUEUSD...

insert file name
Hi, Is there a way to program a cell to see and display the current name of it's Excel file? Similar to the option displaying it in the header or footer, I would like to display the file name in a cell of the spreadsheet itself. Any help would be appreciated. Thanks in advance, Mark Mark Filename> =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,(FIND("]",CELL("filename",A1))+1)-FIND("[",CELL("filename",A1))-2) Sheet name> =MID(CELL("filename",A1),FIND("]",CELL("filename",...

PDF files
I have been asked to send pages from Publisher in PDF format, but I don't know how. Any advice? After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Kevin <anonymous@discussions.microsoft.com>... > I have been asked to send pages from Publisher in PDF > format, but I don't know how. There are a number of programs that can create PDF files Try: Adobe Acrobat - www.adobe.com PDF-Xchange - www.docu-track.com PDF995 - www.pdf995.com Adobe also has a free trial service where you can create 5 PDFs absolutely free. -- Ed Bennett - MVP Microsoft Publish...

Publisher cannot open the file you specified
Hi On a new installation of Pub 2003 on XP, when trying to open a saved file comes up with ' Publisher cannot find the file you specified. The next dialog box will let you browse to locate the file on your hard disk or floppy disk' This seems like a systemic thing, but have run Norton Windoctor, reinstalled, but no luck, continues to get this message, or 'unable to open file'. Any suggestions please This is usually a Norton problem, disable "scrip blocking" and maybe in Norton options, disable "Office Plug-ins." You receive a "File is not avail...

the shell can't find it when i double-click one file
hi all, I need that my application can automatically open some registerd type of file when i double-click this type of file in windows explorer. In a simple MDI-style application, only the following things need to be done when the app object initializes: EnableShellOpen(); RegisterShellFileTypes(FALSE); It seems everything is ok. But my actual application is much more complicated than this sample. When i do like that, one message box, which shoule be from the windows explorer, always appears and say that windows connot find this file.Later, i found one CWinThread thread, different wi...

Can't open my Access files after conversion from Access 97 to Access 2003
Hi, After I converted my MS Access files from ver 97 to 2003, I cannot open them anymore. How can I resolve this problem? I run Windows XP Pro SP 3. Regards M Shafaat It isn't clear what's happening when you try ... more information, please. Are you attempting to open them with Access '97 or with Access 2003? Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereo...

trouble opening up MS Word rtf Mac file on pc
In which format should a Mac (Os 10.3) MS Word file be saved in order to open it up on a PC (Windows XP/MS Word 2003) ? Thanks, David David, Why not try the "save as" format called Word 97-2004? --rms www.rmschneider.com On 10/02/10 07:30, Festus wrote: > In which format should a Mac (Os 10.3) MS Word file be saved in order > to open it up on a PC (Windows XP/MS Word 2003) ? > Thanks, > David Your OS X version really doesn't matter � it's the version of Word/Office that may. But if you're using anything from Word 98-Word 2004 th...

Excel opens files very slowly
I have an odd problem that is driving me nuts. Computer 1 has no problems with Excel Computer 2 has no problems with Excel Computer 3 is my problem. It opens all files, XLS, DBF, etc, extremely slow. I tried a test on a files named "Results.xls". The file is on a local drive of Computer 3 and is 38kb in size. It has no macros, no links, no filters, nothing. It's a simple spreadsheet consisting of 10C x 35R of data. There are no Add-ins loaded on any of the three PCs, nor is there a Personal.xls file loaded on any of them. I opened the same file one computer at a time on...

Consult to Insert Data
Dear all, I'm trying to insert into another table (ex. table2) some information from one table (ex. table1), but in one field of table2 I would like that the consult to insert data put YES for each data added in table2. How can I do this? Thanks!!! Andr=E9. Are you talking about turning OFF the Warning Messages? If you use CurrentDB. Execute then you get no warnings. If you want to just turn off the Warnings then DoCmd.SetWarnings False will do that BUT be sure and issue a DoCmd. SetWarnings True when you are done or you loose all of your warning messages. gatarossi@ig.com.br wrot...

How do you auto-insert text in the subject line in Outlook email
I want a default phrase that appears in my Outlook message SUBJECT line... ie Release Authorised: (then my text). Are there any GURUs that can help me? Also any way of inserting a default entry in the subject line ie YYYYMMDD (eg 20100315-etc etc) "Mouchè" <Mouchè@discussions.microsoft.com> wrote in message news:4010A856-E8D7-4227-9B1D-49C209F9DC54@microsoft.com... >I want a default phrase that appears in my Outlook message SUBJECT line... ie > Release Authorised: (then my text). > > Are there any GURUs that can help me? > > Als...

Viewer for pst files
Is there a freeware or shareware program to view pst files? Thanks, Marcus -- Visit www.goodnewsjail.org What have you done with Jesus? "Marcus Baird" <mkbaird@mindspring.com> wrote in message news:hXsxb.22635$Rk5.14104@newsread1.news.atl.earthlink.net... > Is there a freeware or shareware program to view pst files? > > Thanks, > Marcus > > > -- > Visit www.goodnewsjail.org > What have you done with Jesus? > > No. the only "viewer" for pst files is.........Outlook! Ontrack has a program but it costs way too much. The purpos...

Repost (Simplified, I hope): INSERT INTO
Hello Again, I am trying to do a 2-part append query in VBA where item(s) selected in a multi-select listbox represent record(s) from table CE and its/their underlying records in table CA. For example, Listbox shows: XYZCO 2008 1120Tax (in table CE represents the 2008 corporation tax return) Associated with that (in table CA but not shown in Listbox) will be Assignments: XYZCO 2008 1120Tax FA (for fixed asset work) XYZCO 2008 1120Tax TB (for trial balance work/adjustments) XYZCO 2008 1120Tax PREP (for return preparation) XYZCO 2008 1120Tax REV1 (for first review) ...

pdf files #2
Is it possible to make and save an excel file as a pdf file using macro code? Thanks Matthew -- Matthew McManus ------------------------------------------------------------------------ Matthew McManus's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=5833 View this thread: http://www.excelforum.com/showthread.php?threadid=493331 I did this with Adobe Acrobat v7 - you select the Adobe Printer and Print the Excel file. You should set the options in the Adobe Printer Driver first - I chose "Prompt for Filename" rather than "Save in My Documents&qu...

Excel settings saved with file
Do Excel settings get saved with a file? If I choose Tools/Options/Calculations/Manual and save the file, will anyone else who opens this file automatically receive this same setting even if they have selected Tools/Options/Calculations/Automatic? This has been occuring to a particular file several coworkers use, but it seems like this setting should be user specific and not file specific. Hi j-dawg The first file that Excel opens on each PC will set this setting. -- Regards Ron de Bruin http://www.rondebruin.nl "j-dawg" <anonymous@discussions.microsoft.com> wro...