|
Visual Basic (VB and VBA) |
|
Copyright 1999-2001 Christopher Greaves. All rights reserved. Home Page and email to [email protected] |
| If in doubt, record a macro and inspect the entrails! |
Please read the DISCLAIMER.
Here is an INDEX to all the procedures.
You will probably need one copy of my GLOBAL DECLARATIONS.
Public Function intSaveAsType(strDoc As String, ByVal strType As String, strFileName As String) As Integer
'
' This is an enhanced version dveeloped from Thinker
'
' Procedure : SaveAsType
' Description: Save a file in a specific format, such as "HTML".
' Copyright: Chris Greaves Inc.
' Inputs: A document name, a file type.
' Returns: None.
' Assumes: None.
' Side Effects: None.
' Tested: By the calls shown below.
Dim fc As FileConverter
Dim intTypeSave As Integer
' Determine Saveformat of HTML converter
For Each fc In Application.FileConverters
If fc.ClassName = strType Then
intTypeSave = fc.SaveFormat
Exit For
End If
Next fc
If intTypeSave > 0 Then
strType = Left(strType, 3)
Dim strFile As String
strFile = strGetFilename(strDoc, 5) & strGetFilename(strDoc, 2) & strcExtentSeparator & strType
Documents(strDoc).SaveAs FileName:=strFileName & strFile, FileFormat:=intTypeSave
Else
End If
intSaveAsType = intTypeSave
End Function
| We all knew nothing when we started … |
|
Home Page and Contact Information Send email to [email protected]. This page was last updated Thursday, November 15, 2001 |