Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default how do i create a macro that will print and save my file to sharep

I am creating a reciept for medical services we rendered. I need to put 3
buttons (I know how to ad the button) to an excel sheet that will cause the
program to save the spreadsheet possibly as a PDF or as an excel file on my
sharepoint server. another button that will print the invoice -- specificly
page one --the other pages are referance data and one button that will do
both at the same time and reset the invoice to defaults so we can ad the next
pt info and charges.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default how do i create a macro that will print and save my file to sharep

If it were me, I'd map the sharepoint server to a drive and save to that
location. You could record much of this and then tweak as needed. What
I'd like to know is if there is a way to save to a SharePoint server in a way
that versions are retained. I don't think my method would do it.

Barb Reinhardt



"medic" wrote:

I am creating a reciept for medical services we rendered. I need to put 3
buttons (I know how to ad the button) to an excel sheet that will cause the
program to save the spreadsheet possibly as a PDF or as an excel file on my
sharepoint server. another button that will print the invoice -- specificly
page one --the other pages are referance data and one button that will do
both at the same time and reset the invoice to defaults so we can ad the next
pt info and charges.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default how do i create a macro that will print and save my file to sh

saving to the sharepoint server is not the problem -- the problem is getting
it to save using a nam made up of data from in the spread sheet

"Barb Reinhardt" wrote:

If it were me, I'd map the sharepoint server to a drive and save to that
location. You could record much of this and then tweak as needed. What
I'd like to know is if there is a way to save to a SharePoint server in a way
that versions are retained. I don't think my method would do it.

Barb Reinhardt



"medic" wrote:

I am creating a reciept for medical services we rendered. I need to put 3
buttons (I know how to ad the button) to an excel sheet that will cause the
program to save the spreadsheet possibly as a PDF or as an excel file on my
sharepoint server. another button that will print the invoice -- specificly
page one --the other pages are referance data and one button that will do
both at the same time and reset the invoice to defaults so we can ad the next
pt info and charges.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default how do i create a macro that will print and save my file to sh

Do you mean you want to use some cell entry as the filename?

X = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=X


HTH,
JP



"medic" wrote in message
...
saving to the sharepoint server is not the problem -- the problem is
getting
it to save using a nam made up of data from in the spread sheet

"Barb Reinhardt" wrote:

If it were me, I'd map the sharepoint server to a drive and save to that
location. You could record much of this and then tweak as needed.
What
I'd like to know is if there is a way to save to a SharePoint server in a
way
that versions are retained. I don't think my method would do it.

Barb Reinhardt



"medic" wrote:

I am creating a reciept for medical services we rendered. I need to put
3
buttons (I know how to ad the button) to an excel sheet that will cause
the
program to save the spreadsheet possibly as a PDF or as an excel file
on my
sharepoint server. another button that will print the invoice --
specificly
page one --the other pages are referance data and one button that will
do
both at the same time and reset the invoice to defaults so we can ad
the next
pt info and charges.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default how do i create a macro that will print and save my file to sh

still wont work here is what I got the last 2 line are in red:

Sub save()
'
' save Macro
'

'
ChDir "C:\Users\medic\Documents\vaccine form"
x = d1.Value
ActiveWorkbook.SaveAs Filename:=x
"C:\Users\medic\Documents\vaccine form\vaccines form1.xlsm",
FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub


thansk for the help

"JP" wrote:

Do you mean you want to use some cell entry as the filename?

X = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=X


HTH,
JP



"medic" wrote in message
...
saving to the sharepoint server is not the problem -- the problem is
getting
it to save using a nam made up of data from in the spread sheet

"Barb Reinhardt" wrote:

If it were me, I'd map the sharepoint server to a drive and save to that
location. You could record much of this and then tweak as needed.
What
I'd like to know is if there is a way to save to a SharePoint server in a
way
that versions are retained. I don't think my method would do it.

Barb Reinhardt



"medic" wrote:

I am creating a reciept for medical services we rendered. I need to put
3
buttons (I know how to ad the button) to an excel sheet that will cause
the
program to save the spreadsheet possibly as a PDF or as an excel file
on my
sharepoint server. another button that will print the invoice --
specificly
page one --the other pages are referance data and one button that will
do
both at the same time and reset the invoice to defaults so we can ad
the next
pt info and charges.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default how do i create a macro that will print and save my file to sh

I don't understand your code here.

1. By "x = d1.Value" do you mean "x = Range("D1").Value" ??

2. The FileName property only takes one argument, it looks like you
are trying to use two (variable 'x' and a workbook name). You can use

ActiveWorkbook.SaveAs Filename:=x

OR

ActiveWorkbook.SaveAs Filename:="C:\Users\medic\Documents\vaccine form
\vaccines form1.xlsm"

but not both at the same time.


HTH,
JP

On Jan 5, 10:02*am, medic wrote:
still wont work here is what I got the last 2 line are in red:

Sub save()
'
' save Macro
'

'
* * ChDir "C:\Users\medic\Documents\vaccine form"
* * x = d1.Value
* * ActiveWorkbook.SaveAs Filename:=x
* * * * "C:\Users\medic\Documents\vaccine form\vaccines form1.xlsm",
FileFormat:= _
* * * * xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub

thansk for the help



"JP" wrote:
Do you mean you want to use some cell entry as the filename?


X = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=X


HTH,
JP


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a code to print and save file as Ron de Bruin Excel Programming 4 January 9th 07 08:42 PM
how can I create a save file hyperlink or macro in a workbook? Jon Peltier Excel Programming 0 December 29th 06 06:33 PM
Create a print macro that would automatically select print area? wastedwings Excel Worksheet Functions 7 August 22nd 05 10:36 PM
Macro to save file and print document abxy[_7_] Excel Programming 2 January 14th 04 03:45 AM
FILE Save As / FILE Print greyed out in Excel Jeff Wright Excel Programming 2 September 3rd 03 09:29 AM


All times are GMT +1. The time now is 04:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"